From d25f491654b8b870ddb3fdc0161859ebefec8a1b Mon Sep 17 00:00:00 2001 From: Martin Hawlisch Date: Fri, 15 Jul 2005 07:47:36 +0000 Subject: [PATCH] * src/plugin/NavWebPage.py: HTML validation fixes svn: r4938 --- gramps2/ChangeLog | 2 +- gramps2/src/plugins/NavWebPage.py | 17 +++++++++-------- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/gramps2/ChangeLog b/gramps2/ChangeLog index a3219cc51..f5e24bc91 100644 --- a/gramps2/ChangeLog +++ b/gramps2/ChangeLog @@ -1,5 +1,5 @@ 2005-07-15 Martin Hawlisch - * src/plugins/NavWebPage.py: Avoid some segfaults + * src/plugins/NavWebPage.py: Avoid some segfaults; HTML validation fixes * src/Utils.py (find_mime_type_pixbuf): Dont segfault with note only object * src/SelectObject.py (on_select_row): Dont segfault with note only object diff --git a/gramps2/src/plugins/NavWebPage.py b/gramps2/src/plugins/NavWebPage.py index 4eea0b54e..59c16efd5 100644 --- a/gramps2/src/plugins/NavWebPage.py +++ b/gramps2/src/plugins/NavWebPage.py @@ -211,7 +211,7 @@ class BasePage: of.write('
\n') of.write('' % (photo_handle,self.ext)) of.write('') + of.write('height="100" alt="%s">' % photo.get_description()) of.write('
\n') except (IOError,OSError),msg: ErrorDialog(str(msg)) @@ -475,7 +475,7 @@ class MediaPage(BasePage): try: of.write('
\n') of.write('' % newpath) + of.write('src="%s" alt="%s"/>' % (newpath, title)) of.write('
\n') except (IOError,OSError),msg: ErrorDialog(str(msg)) @@ -490,6 +490,7 @@ class MediaPage(BasePage): of.write('%s\n' % photo.mime) of.write('\n') of.write('\n') + of.write('\n') self.display_note_object(of, photo.get_note_object()) @@ -580,7 +581,7 @@ class IntroductionPage(BasePage): newpath = self.copy_media(obj) of.write('
\n') of.write('' % newpath) + of.write('src="%s" alt="%s" />' % (newpath, obj.get_description())) of.write('
\n') except (IOError,OSError),msg: ErrorDialog(str(msg)) @@ -625,7 +626,7 @@ class HomePage(BasePage): newpath = self.copy_media(obj) of.write('
\n') of.write('' % newpath) + of.write('src="%s" alt="%s" />' % (newpath, obj.get_description())) of.write('
\n') except (IOError,OSError),msg: ErrorDialog(str(msg)) @@ -677,7 +678,7 @@ class SourcesPage(BasePage): of.write('\n') index += 1 - of.write('\n
\n') + of.write('\n
\n') self.display_footer(of) self.close_file(of) @@ -756,7 +757,7 @@ class GalleryPage(BasePage): of.write('\n') index += 1 - of.write('\n
\n') + of.write('\n
\n') self.display_footer(of) self.close_file(of) @@ -819,7 +820,7 @@ class ContactPage(BasePage): of.write('') of.write('
') of.write('' % (note_id,self.ext)) + of.write('src="%s.%s" alt="%s" />' % (note_id,self.ext,obj.get_description())) of.write('
\n') of.write('\n') except (IOError,OSError),msg: @@ -1216,7 +1217,7 @@ class IndividualPage(BasePage): text = text + " " for handle in gid_list: src = self.db.get_source_from_handle(handle) - text = text + ' [%s]' % (handle,self.ext,src.gramps_id) + text = text + ' [%s]' % (handle,self.ext,src.gramps_id) text = text + "" return text