[wp-testers] Visual editor damages <map></map> HTML construct (3.2 beta1 nightly)
Andrew Ozz
admin at laptoptips.ca
Mon May 23 00:50:16 UTC 2011
On 22/05/2011 3:07 PM, Peter van den Hamer (MSN) wrote:
> ...
> <map name="homepagemap">
> <area shape="rect" coords="15,15,75,95" href="hrefA" title="textA"/>
> <area shape="rect" coords="82,15,142,95" href="hrefB" title="textB"/>
> <area shape="rect" coords="147,15,207,95" href="hrefC" title="textC"/>
> </map>
> =============
> <map name="homepagemap"> <area title="textA" shape="rect"
> coords="15,15,75,95" href="hrefA" /></map>
> <map name="homepagemap"> <area title="textB" shape="rect"
> coords="82,15,142,95" href="hrefB" /></map>
> <map name="homepagemap"> <area title="textC" shape="rect"
> coords="147,15,207,95" href="hrefC" /></map>
This is actually due to wpautop. It interprets a single line break as a
<br /> and two line breaks as <p>. So the HTML that was entered in
TinyMCE was something like:
<map name="homepagemap"><br />
<area shape="rect" coords=".../><br />
<area shape="rect" coords=".../><br />
</map><br />
and it was "corrected" to what you saw.
I know line breaks don't matter in HTML but they _do_ matter in the HTML
editor (because of wpautop). Entering all <area.../> tags on the same
line would fix that.
More information about the wp-testers
mailing list