]> git.phdru.name Git - bookmarks_db.git/blobdiff - Writers/bkmk_whtml.py
Fix: do not write LAST_MODIFIED is it's None
[bookmarks_db.git] / Writers / bkmk_whtml.py
index 309fdcfdd6114aeed19509c1efcd90cc1ed792aa..caf374737b29f3ea873cbe0c9599c931b7d233da 100644 (file)
@@ -3,11 +3,8 @@
 This file is a part of Bookmarks database and Internet robot.
 """
 
-__version__ = "$Revision$"[11:-2]
-__revision__ = "$Id$"[5:-2]
-__date__ = "$Date$"[7:-2]
 __author__ = "Oleg Broytman <phd@phdru.name>"
-__copyright__ = "Copyright (C) 2000-2011 PhiloSoft Design"
+__copyright__ = "Copyright (C) 2000-2012 PhiloSoft Design"
 __license__ = "GNU GPL"
 
 __all__ = ['writer_html']
@@ -23,7 +20,6 @@ def dump_comment(comment):
       comment = comment.replace("\n", "<BR>\n")
    return comment
 
-
 ind_s = " "*4
 
 class writer_html(Writer):
@@ -49,9 +45,10 @@ class writer_html(Writer):
       self.outfile.write(ind_s*level + "</DL><p>\n")
 
    def bookmark(self, b, level):
-      self.outfile.write(ind_s*(level+1) + '<DT><A HREF="%s" ADD_DATE="%s"' % (b.href.encode(default_encoding), b.add_date))
+      self.outfile.write(ind_s*(level+1) + '<DT><A HREF="%s" ADD_DATE="%s"' % (b.href, b.add_date))
       if b.last_visit: self.outfile.write(' LAST_VISIT="%s"' % b.last_visit)
-      self.outfile.write(' LAST_MODIFIED="%s"' % b.last_modified)
+      if b.last_modified:
+         self.outfile.write(' LAST_MODIFIED="%s"' % b.last_modified)
       if BKMK_FORMAT == "MOZILLA":
          if b.keyword: self.outfile.write(' SHORTCUTURL="%s"' % b.keyword)
          if b.icon_href: self.outfile.write(' ICON_URI="%s"' % b.icon_href)