Lutz,
When using xml-parse to read xhtml (which is valid xml), any attributes which contain quotation marks, even escaped or in a CDATA block, will cause an error:
Code: Select all
<a href="/some/path" title="something" onclick="alert(\"Hello world\")">Looky here</a>
This should validate. It would be impossible to make this render correctly using anything apart from single quotes, and that would mean forcing double quotes to single quotes as a direct translation, which might corrupt some javascript (which can use both in the same string). The following is an example that should be valid xml and demonstrates the problem:
Code: Select all
<a href="/some/path/" title="something" onclick="alert(\"Hello\" + 'world')">Looky here</a>
I could get it to validate using the html entity, but it would not function when rendered as a string. Escaping the quotes should be valid; I can't find anything forbidding this in the xhtml spec.
PS Excuse the visible entities - can't figure out any other way to display the contents of an html tag, since the BB seems to be stripping any attributes off.