bug 8510 fix for special characters in Family Tree names

This commit is contained in:
prculley authored and Nick Hall committed 2016-12-17 19:30:44 +00:00
1 parent 341d48bd40
commit 9c92bb8551
1 file changed
+3
+3
View File
@@ -36,6 +36,7 @@ import copy
import subprocess
from urllib.parse import urlparse
import logging
import re
#-------------------------------------------------------------------------
#
@@ -543,6 +544,8 @@ class DbManager(CLIDbManager):
If the new string is empty, do nothing. Otherwise, renaming the
database is simply changing the contents of the name file.
"""
# kill special characters so can use as file name in backup.
new_text = re.sub(r"[':<>|,;=\"\[\]\.\+\*\/\?\\]", "_", new_text)
#path is a string, convert to TreePath first
path = Gtk.TreePath(path=path)
if len(new_text) > 0: