Follow-up Comment #2, bug #5301 (project savane):
> IMHO, utils_wiki_markup should be of safe usage: it should
> always provide XHTML compliant code.
Yes, I've put quite some effort into that function to gracefully handle user
errors and *still* produce valid XHTML.
> We must be able to write
> print '<p>'.utils_wiki_markup($content).'</p>';
> safely.
Hm, that won't be possible. We must rely on utils_wiki_markup to always
return valid XHTML markup. If in doubt, we should change the calling code.
The reason is simply that you don't know in advance how the $content will be
rendered. If it starts with a heading, you won't get valid XHTML with your
code example above, because you'll get this: "<p><h1>heading</h1></p>".
This is even true if you disallow all headings, <hr>, and lists for $content,
because $content might start with a quoted paragraph, which would result in
'<p><p class="quote">> Quote</p></p>'.
_______________________________________________________
Reply to this item at:
<http://gna.org/bugs/?func=detailitem&item_id=5301>
_______________________________________________
Message sent via/by Gna!
http://gna.org/
_______________________________________________
Savane-dev mailing list
[email protected]
https://mail.gna.org/listinfo/savane-dev