Dear developers,
I noted that html//1 always wants to quote the tag attributes:
Example (with & replaced by $):
html(math(mfenced(separators(‘$nbsp;’), [mtext(a), mtext(b)])), M, ), print_html(M).
Result is (with spaces inserted into the tags to make them visible, and & replaced by $)
< math>
< mfenced separators=“$amp;nbsp;”>
< mtext>a< /mtext>
< mtext>b< /mtext>
< /mfenced>
< /math>
This is because the html attributes always undergo quoting in html//1. I would like to
suppress it using the backslash (as in the content of html tags), but this does not work for the attributes,
html(math(mfenced(separators(\‘$nbsp;’), [mtext(a), mtext(a)])))
raises an error that an atom is expected. I could fix the problem by inserting the following line into library/http/html_write.pl (around line 830)
html_quoted_attribute(\Text) → !, [ Text ]. % inserted
html_quoted_attribute(Text) →
{ xml_quote_attribute(Text, Quoted, utf8) },
[ Quoted ].
I don’t think this breaks existing code, or will it? You might wish to integrate this into the code. Thank you for your consideration.
Best wishes,
Matthias