From bccd2fc07d7b5d1209a3b228232902514e1f6c9c Mon Sep 17 00:00:00 2001 From: Brian Matherly Date: Wed, 30 Jan 2008 05:11:44 +0000 Subject: [PATCH] Escape characters in image names for ODF output. svn: r9961 --- ChangeLog | 3 +++ src/docgen/ODFDoc.py | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index d71a37008..fdc535f10 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,6 @@ +2008-01-29 Brian Matherly + * src/docgen.ODFDoc.py: escape characters in image names for ODF output. + 2008-01-29 Raphael Ackermann * src/ViewManager.py: 0001641: add ... ellipsis to menu items. * src/plugins/Calendar.py: 0001641: add ... ellipsis to menu items. diff --git a/src/docgen/ODFDoc.py b/src/docgen/ODFDoc.py index 5c45f42f1..eeafc24d6 100644 --- a/src/docgen/ODFDoc.py +++ b/src/docgen/ODFDoc.py @@ -454,7 +454,7 @@ class ODFDoc(BaseDoc.BaseDoc, BaseDoc.TextDoc, BaseDoc.DrawDoc): if not media_list_item in self.media_list: self.media_list.append(media_list_item) - base = os.path.basename(name) + base = escape(os.path.basename(name)) tag = base.replace('.', '_') if self.new_cell: @@ -904,7 +904,7 @@ class ODFDoc(BaseDoc.BaseDoc, BaseDoc.TextDoc, BaseDoc.DrawDoc): self.mfile.write('manifest:full-path="/"/>') for image in self.media_list: i = image[0] - base = os.path.basename(i) + base = escape(os.path.basename(i)) self.mfile.write('