-
FEATURED COMPONENTS
First time here? Check out the FAQ!
Hi,
I'm trying to use some of the available open source html2image utilities available in order to capture the html generated by the zul renderer into an image. While html2image does accept and process the html I fed to her by applying the tip in this forum question, flying saucer complains about the provided html not being valid. I've inspected the obtained html and compared it with that unveiled by using firebug's html inspector. They're the same and do indeed contain invalid html markup, for instance:
<div class="z-vlayout-inner" id="dFUYt3-chdex"> <img src="/zksandbox/zkau/view/z_9m00/dFUYt3/a4h1/1/c/captcha1328787157810.png" style="width:150px;height:50px;" id="dFUYt3"> </div>
Am I doing something that might prevent the html from being generated or retrieved as valid markup? Is it some bug to be fixed in a forthcoming zk release?
With kind regards
César Varona
You cannot do that kind of reasoning about HTML validity with Firebug's HTML inspector, because Firebug only sees the internal representation, not the source HTML that was used. You can verify that yourself by inspecting any img tag in any website. Even if the source HTML contains the self-closing tag, it will not appear when inspecting the element (at least in FF10).
The same thing applies to the innerHTML property in Javascript that is used in the forum post you mentioned. Here's a relevant stackoverflow question
It's also worth noting that HTML5 makes self-closing tags optional, so that markup is actually valid HTML 5.
Asked: 2012-02-09 11:51:54 +0800
Seen: 197 times
Last updated: Feb 15 '12