On 11/27/2016 09:25 AM, Patrice Dumas wrote:
On Sun, Nov 27, 2016 at 09:41:22AM +0000, Gavin Smith wrote:
This looks like it would be easy to change. The code is in
_convert_image_command in tp/Texinfo/Convert/HTML.pm. It looks like
the current behaviour was deliberate, but I don't know why it was done
the way it was.
I do not remember either. One possibility could be that the resulting
HTML is not valid, like no <img> in <pre>, but I do not have checked if
it is so.
<img> is valid in <pre> in HTML5, by my reading:
https://www.w3.org/TR/html5/grouping-content.html#the-pre-element
https://www.w3.org/TR/html5/dom.html#phrasing-content-1
It is not valid in HTML4.
https://www.w3.org/TR/html4/struct/text.html#edef-PRE
The fix: makeinfo should stop emitting:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
Instead we should follow the HTML5 recommendation and emit:
<!DOCTYPE html>
This only effects validation, I believe.
Older browser should have no problems, except the shortened DOCTYPE
should be present to disable quirks mode.
--
--Per Bothner
[email protected] http://per.bothner.com/