Emit HTML 4.01 instead of HTML5

34 views
Skip to first unread message

Johannes Lichtenberger

unread,
Oct 15, 2014, 5:40:38 AM10/15/14
to owasp-java-html-...@googlegroups.com
Hello,

is it possible to emit HTML 4.01 instead of HTML5? We currently have the problem that we specify HTML 4.01 in the doctype declaration, whereas it seems that for instance the '+' is encoded as + and the Browser doesn't parse the entity (and I think it's not specified in HTML 4.01). Wouldn't it be possible to use the named entities (+) or switch between HTML versions (which might be impossible due to the heavy changes).

Thank you.

Kind regards
Johannes

Johannes Lichtenberger

unread,
Oct 15, 2014, 6:04:32 AM10/15/14
to owasp-java-html-...@googlegroups.com
Am Mittwoch, 15. Oktober 2014 11:40:38 UTC+2 schrieb Johannes Lichtenberger:
is it possible to emit HTML 4.01 instead of HTML5? We currently have the problem that we specify HTML 4.01 in the doctype declaration, whereas it seems that for instance the '+' is encoded as + and the Browser doesn't parse the entity (and I think it's not specified in HTML 4.01). Wouldn't it be possible to use the named entities (+) or switch between HTML versions (which might be impossible due to the heavy changes).

I mean the browser doesn't replace the entity code. However we just switched to HTML5 to test the issue and for instance telephone numbers are still preceded by the entity code + instead of a plus-sign.

Johannes Lichtenberger

unread,
Oct 15, 2014, 9:05:07 AM10/15/14
to owasp-java-html-...@googlegroups.com
Ok, just ignore my "issue". It became apparent that another renderer (just doing HTML-encoding did encode the & afterwards into & -- which didn't became apparent in the DOM, inside a textarea- or pre-element).On another note I'm not really sure if we have cases where the combination of both renderers makes sense at all.
Reply all
Reply to author
Forward
0 new messages