bug 8510 fix for special characters in Family Tree names

This commit is contained in:
prculley 2016-12-13 09:17:54 -06:00 committed by Nick Hall
parent 341d48bd40
commit 9c92bb8551

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: