From 9c92bb85519bb091b443f726149a3cbf46adfae1 Mon Sep 17 00:00:00 2001 From: prculley Date: Tue, 13 Dec 2016 09:17:54 -0600 Subject: [PATCH] bug 8510 fix for special characters in Family Tree names --- gramps/gui/dbman.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gramps/gui/dbman.py b/gramps/gui/dbman.py index 6e52c11e7..956dbadd4 100644 --- a/gramps/gui/dbman.py +++ b/gramps/gui/dbman.py @@ -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: