Permalink
Browse files

webdoc.py: fixes an issue with <br></br> tags not recongized by some …

…browsers
  • Loading branch information...
1 parent 044ef2b commit 8e3b3d12eb2fecc9e3b45bb0325895296092f60f @vedaldi vedaldi committed Jun 14, 2011
Showing with 9 additions and 5 deletions.
  1. +9 −5 docsrc/webdoc.py
View
@@ -721,11 +721,15 @@ def publish(self, gen, pageNode = None):
gen.putString(name)
gen.putString("=")
gen.putXMLAttr(expandAttr(value, pageNode))
- gen.putString(">")
- DocNode.publish(self, gen, pageNode)
- gen.putString("</")
- gen.putString(self.tag)
- gen.putString(">")
+ if self.tag == 'br':
+ # workaround for browser that do not like <br><br/>
+ gen.putString("/>")
+ else:
+ gen.putString(">")
+ DocNode.publish(self, gen, pageNode)
+ gen.putString("</")
+ gen.putString(self.tag)
+ gen.putString(">")
publish = makeGuard(publish)

0 comments on commit 8e3b3d1

Please sign in to comment.