Quote:
Originally Posted by kovidgoyal
This is done deliberately, see line 441 in oeb/base.py
|
I see the comment about some browser based renderers. I wonder if this is still true. I've no idea when this code was written.

But my boss needs self closing tags. So if, at line 160 we had:
Code:
def close_self_closing_tags(raw):
if self_closing_tags_permitted():
return raw
for_unicode = isinstance(raw, str)
repl = as_string_type(r'<\g<tag>\g<arg>></\g<tag>>', for_unicode)
pat = self_closing_pat(for_unicode)
return pat.sub(repl, raw)
And in 'tweaks', wherever they are coded, the self_closing_tags_permitted() function is added. Returning false by default, but true if so configured by the user. Then we get the best of both worlds. Am I on the right track?