View Full Version : html editor and <img> </img> tag ?

28 Dec 2009, 10:11 AM
Hi, I set in htmleditor in source edit this code html

<img src="../../images/SafeHarbor-logo-280x115.jpg" alt="SafeHarbor" border="0"></img>

when I return to view the image appear ok, then I return again to modified the html code and the editor show me now

<img src="../../images/SafeHarbor-logo-280x115.jpg" alt="SafeHarbor" border="0">

I mean remove the </img>, that is bad because when I valid the html using http://validator.w3.org/ I get error

Missing end tags. The w3c validator reports this as “end tag for “img” omitted, but OMITTAG NO was specified” for your particular tag–what it means is that you used a singleton tag, that is, a tag that stands by itself and doesn’t have an inherent end tag, so you must use the xml style / delimiter to signify that the tag ends itself. So, instead of <img src=”http://example.com” alt=”Example image” > you would write <img src=”http://example.com” alt=”Example image” />.

if I set then

<img src="../../images/SafeHarbor-logo-280x115.jpg" alt="SafeHarbor" border="0"/>

again the html editor when I going to watch the source remove the end tags "/"

any advice please is welcome


28 Dec 2009, 1:44 PM
That is the Midas editor making those changes, so im not sure what you can do about it on the client side, other than fixing the html with a regex or something when you read the value. Kinda funny that they would do that.

1 Feb 2010, 9:05 AM
I encountered the same problem. Using a form creator, I got a code, which had its own rules. But it all worked. Perhaps this is a way of information presenting.