Closed Ummon closed 12 years ago
Yes, this is an issue. We had a discussion on the list awhile back that's somewhat related to this; it was about differences between HTML versions that ehtml should be able to handle. The img tag, for example, has no closing tag in HTML but does in XHTML. I know how to fix it but have just never gotten to it.
But <img src=".." /> is both valid in XHTML and HTML!? So why do not use this notation?
The img tag is just one example of differences between various HTML versions. To address this properly means
As I said, I know how to do all this. I just haven't gotten a chance to work on it yet.
OK, thanks for your comments (and all your work), I will be patient ;)
On 05/18/2011 08:32 PM, Ummon wrote:
Markup without content do not generate a well formed HTML. For example {img, [{src, "img/foo.png"}]} will be translated to instead of.
W3C example: http://validator.w3.org/check?uri=http%3A%2F%2Fwww.d-lan.net%2Fdonate.html&charset=%28detect+automatically%29&doctype=Inline&group=0&user-agent=W3C_Validator%2F1.2 source: https://github.com/Ummon/D-LAN/blob/2a114f46a09f063c22aee5f20765049789c670ef/yssi/donate.yaws
I don't think it costs to much to change this behavior.
Yaws version I use: 1.88
Hmmmm.. this has been up for discussion many times. I don't exactly recall what the snag was, but there was indeed a snag.
If you post to the erlang list, I'm sure someone recalls, or if you search the archives ....
/klacke
The new exhtml mode is the solution. New return value from out/1
{exhtml, Struct}
produces proper strict xhtml
Great, thank you :D
Markup without content do not generate a well formed HTML. For example {img, [{src, "img/foo.png"}]} will be translated to <img src="img/foo.png"></img> instead of <img src="img/foo.png" />.
W3C example: http://validator.w3.org/check?uri=http%3A%2F%2Fwww.d-lan.net%2Fdonate.html&charset=%28detect+automatically%29&doctype=Inline&group=0&user-agent=W3C_Validator%2F1.2 source: https://github.com/Ummon/D-LAN/blob/2a114f46a09f063c22aee5f20765049789c670ef/yssi/donate.yaws
I don't think it costs to much to change this behavior.
Yaws version I use: 1.88