diff --git a/gramps/plugins/docgen/svgdrawdoc.py b/gramps/plugins/docgen/svgdrawdoc.py index 377573ad1..e60c2c29f 100644 --- a/gramps/plugins/docgen/svgdrawdoc.py +++ b/gramps/plugins/docgen/svgdrawdoc.py @@ -31,7 +31,7 @@ SVG document generator. # #------------------------------------------------------------------------- from io import StringIO - +from xml.sax.saxutils import escape #------------------------------------------------------------------------- # # Gramps modules @@ -147,7 +147,7 @@ class SvgDrawDoc(BaseDoc, DrawDoc): linex = xpos + (width - self.string_width(font, line)) / 2 self.buffer.write( '' % (linex, size) + - line + + escape(line) + '' ) self.buffer.write('\n') @@ -273,7 +273,7 @@ class SvgDrawDoc(BaseDoc, DrawDoc): self.buffer.write(' font-family:serif;') self.buffer.write( '">' + - line + + escape(line) + '\n' ) @@ -307,7 +307,7 @@ class SvgDrawDoc(BaseDoc, DrawDoc): self.buffer.write('font-family:serif;') self.buffer.write( '">' + - text + + escape(text) + '\n' )