2007-04-10 Don Allingham <don@gramps-project.org>
* src/GrampsDb/_ReadGedcom.py: add hack to force illegal "BET ABT" to be read as "EST BET" * src/ReportBase/_BareReportDialog.py: escape ampersands * src/docgen/ODFDoc.py: escape ampersands * src/ManagedWindow.py: escape ampersands svn: r8377
This commit is contained in:
parent
fdec255b9f
commit
553477b1d5
@ -1,3 +1,10 @@
|
||||
2007-04-10 Don Allingham <don@gramps-project.org>
|
||||
* src/GrampsDb/_ReadGedcom.py: add hack to force illegal "BET ABT" to be read
|
||||
as "EST BET"
|
||||
* src/ReportBase/_BareReportDialog.py: escape ampersands
|
||||
* src/docgen/ODFDoc.py: escape ampersands
|
||||
* src/ManagedWindow.py: escape ampersands
|
||||
|
||||
2007-04-10 Martin Hawlisch <Martin.Hawlisch@gmx.de>
|
||||
* src/plugins/ImportGeneWeb.py: Some parsing enhancements
|
||||
|
||||
|
@ -2382,8 +2382,11 @@ class GedcomParser(UpdateCallback):
|
||||
self.not_recognized(level+1)
|
||||
return date
|
||||
|
||||
def extract_date(self,text):
|
||||
def extract_date(self, text):
|
||||
dateobj = RelLib.Date()
|
||||
|
||||
text = text.replace('BET ABT','EST BET') # Horrible hack for Tim Lyons
|
||||
|
||||
try:
|
||||
match = intRegexp.match(text)
|
||||
if match:
|
||||
@ -2391,7 +2394,6 @@ class GedcomParser(UpdateCallback):
|
||||
text, comment = match.groups()
|
||||
else:
|
||||
int_val = False
|
||||
|
||||
match = modRegexp.match(text)
|
||||
qual = None
|
||||
if match:
|
||||
|
@ -395,7 +395,8 @@ class ManagedWindow:
|
||||
#-------------------------------------------------------------------------
|
||||
def set_titles(window,title,t,msg=None):
|
||||
if title:
|
||||
title.set_text('<span weight="bold" size="larger">%s</span>' % t)
|
||||
print escape(t)
|
||||
title.set_text('<span weight="bold" size="larger">%s</span>' % escape(t))
|
||||
title.set_use_markup(True)
|
||||
if msg:
|
||||
window.set_title('%s - GRAMPS' % msg)
|
||||
|
@ -27,6 +27,7 @@
|
||||
#-------------------------------------------------------------------------
|
||||
from types import ClassType, InstanceType
|
||||
from gettext import gettext as _
|
||||
from xml.sax.saxutils import escape
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
@ -126,7 +127,7 @@ class BareReportDialog(ManagedWindow.ManagedWindow):
|
||||
self.local_filters = []
|
||||
|
||||
window = gtk.Dialog('GRAMPS')
|
||||
self.set_window(window,None,self.get_title())
|
||||
self.set_window(window, None, self.get_title())
|
||||
self.window.set_has_separator(False)
|
||||
|
||||
if self.HELP_TOPIC:
|
||||
@ -330,7 +331,7 @@ class BareReportDialog(ManagedWindow.ManagedWindow):
|
||||
of the currently selected person."""
|
||||
|
||||
title = self.get_header(self.name)
|
||||
label = gtk.Label('<span size="larger" weight="bold">%s</span>' % title)
|
||||
label = gtk.Label('<span size="larger" weight="bold">%s</span>' % escape(title))
|
||||
label.set_use_markup(True)
|
||||
self.window.vbox.pack_start(label, True, True,
|
||||
BareReportDialog.border_pad)
|
||||
|
@ -824,7 +824,7 @@ class ODFDoc(BaseDoc.BaseDoc):
|
||||
self.cntnt.write(name)
|
||||
self.cntnt.write('" text:outline-level="' + str(self.level) + '">')
|
||||
if leader != None:
|
||||
self.cntnt.write(leader)
|
||||
self.cntnt.write(escape(leader))
|
||||
self.cntnt.write('<text:tab/>')
|
||||
self.new_cell = 0
|
||||
|
||||
@ -995,7 +995,7 @@ class ODFDoc(BaseDoc.BaseDoc):
|
||||
self.cntnt.write('<text:p text:style-name="X%s"> ' % pname)
|
||||
|
||||
self.cntnt.write('<text:span text:style-name="F%s">\n' % pname)
|
||||
self.write_text('\n'.join(text))
|
||||
self.write_text('\n'.join(escape(text)))
|
||||
self.cntnt.write('</text:span>\n</text:p>\n</draw:text-box>\n')
|
||||
self.cntnt.write('</draw:frame>\n')
|
||||
|
||||
@ -1067,7 +1067,7 @@ class ODFDoc(BaseDoc.BaseDoc):
|
||||
self.cntnt.write('<text:p text:style-name="F%s">' % para_name)
|
||||
self.cntnt.write('<text:span text:style-name="F%s"' % para_name)
|
||||
self.cntnt.write(' fo:max-height="%.2f">' % font.get_size() )
|
||||
self.cntnt.write(text)
|
||||
self.cntnt.write(escape(text))
|
||||
self.cntnt.write('</text:span></text:p>')
|
||||
self.cntnt.write('</draw:text-box>\n')
|
||||
self.cntnt.write('</draw:frame>\n')
|
||||
@ -1139,7 +1139,7 @@ class ODFDoc(BaseDoc.BaseDoc):
|
||||
self.cntnt.write('<draw:text-box>')
|
||||
self.cntnt.write('<text:p text:style-name="X%s">' % para_name)
|
||||
self.cntnt.write('<text:span text:style-name="F%s">' % para_name)
|
||||
self.cntnt.write(text)
|
||||
self.cntnt.write(escape(text))
|
||||
self.cntnt.write('</text:span>\n')
|
||||
self.cntnt.write('</text:p>\n')
|
||||
self.cntnt.write('</draw:text-box>')
|
||||
|
Loading…
Reference in New Issue
Block a user