* src/docgen/OpenSpreadSheet.py (write_text): Escape special
XML characters. svn: r3644
This commit is contained in:
parent
ef74b8d126
commit
98f99c995a
@ -1,3 +1,7 @@
|
|||||||
|
2004-10-18 Alex Roitman <shura@alex.neuro.umn.edu>
|
||||||
|
* src/docgen/OpenSpreadSheet.py (write_text): Escape special
|
||||||
|
XML characters.
|
||||||
|
|
||||||
2004-10-17 Don Allingham <dallingham@users.sourceforge.net>
|
2004-10-17 Don Allingham <dallingham@users.sourceforge.net>
|
||||||
* src/EditPerson.py: saving grouping name, instead of surname for
|
* src/EditPerson.py: saving grouping name, instead of surname for
|
||||||
updating of the person list
|
updating of the person list
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# Gramps - a GTK+/GNOME based genealogy program
|
# Gramps - a GTK+/GNOME based genealogy program
|
||||||
#
|
#
|
||||||
# Copyright (C) 2000-2003 Donald N. Allingham
|
# Copyright (C) 2000-2004 Donald N. Allingham
|
||||||
#
|
#
|
||||||
# This program is free software; you can redistribute it and/or modify
|
# This program is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
@ -18,6 +18,8 @@
|
|||||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
#
|
#
|
||||||
|
|
||||||
|
# $Id$
|
||||||
|
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
# Standard Python Modules
|
# Standard Python Modules
|
||||||
@ -25,8 +27,8 @@
|
|||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
import os
|
import os
|
||||||
import tempfile
|
import tempfile
|
||||||
import string
|
|
||||||
import zipfile
|
import zipfile
|
||||||
|
from gettext import gettext as _
|
||||||
|
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
@ -39,7 +41,6 @@ from SpreadSheetDoc import *
|
|||||||
from latin_utf8 import latin_to_utf8
|
from latin_utf8 import latin_to_utf8
|
||||||
import const
|
import const
|
||||||
|
|
||||||
from gettext import gettext as _
|
|
||||||
import Errors
|
import Errors
|
||||||
|
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
@ -387,8 +388,11 @@ class OpenSpreadSheet(SpreadSheetDoc):
|
|||||||
if self.content == 0:
|
if self.content == 0:
|
||||||
self.f.write('<text:p>')
|
self.f.write('<text:p>')
|
||||||
self.content = 1
|
self.content = 1
|
||||||
text = string.replace(text,'\t','<text:tab-stop/>')
|
text = text.replace('&','&') # Must be first
|
||||||
text = string.replace(text,'\n','<text:line-break/>')
|
text = text.replace('<','<')
|
||||||
|
text = text.replace('>','>')
|
||||||
|
text = text.replace('\t','<text:tab-stop/>')
|
||||||
|
text = text.replace('\n','<text:line-break/>')
|
||||||
self.f.write(latin_to_utf8(text))
|
self.f.write(latin_to_utf8(text))
|
||||||
|
|
||||||
def _write_manifest(self):
|
def _write_manifest(self):
|
||||||
@ -471,4 +475,3 @@ class OpenSpreadSheet(SpreadSheetDoc):
|
|||||||
self.f.write('</office:meta>\n')
|
self.f.write('</office:meta>\n')
|
||||||
self.f.write('</office:document-meta>\n')
|
self.f.write('</office:document-meta>\n')
|
||||||
self.f.close()
|
self.f.close()
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user