[wp-trac] [WordPress Trac] #9437: WordPress munges camelcase inline
SVG elements
WordPress Trac
wp-trac at lists.automattic.com
Wed Apr 1 13:39:25 GMT 2009
#9437: WordPress munges camelcase inline SVG elements
--------------------------+-------------------------------------------------
Reporter: codedread | Owner: anonymous
Type: defect (bug) | Status: new
Priority: normal | Milestone: Unassigned
Component: General | Version: 2.5
Severity: normal | Keywords: xhtml, svg
--------------------------+-------------------------------------------------
My WordPress 2.5 install serves the application/xhtml+xml MIME type (true
XHTML) for the purposes of inlining SVG which I've done on my 'blog
chrome'. However, if I try to inline SVG in the contents of a post as
follows:
<svg xmlns="http://www.w3.org/2000/svg">
<circle cx="50" cy="50" r="30" fill="blue">
<animateTransform attributeName="transform" type="scale" to="1.5"
dur="2s" fill="freeze"/>
</circle>
</svg>
WordPress mangles it into:
<svg xmlns="http://www.w3.org/2000/svg"><br />
<circle cx="50" cy="50" r="30" fill="blue"><br />
<animatetransform attributeName="transform" type="scale" to="1.5"
dur="2s" fill="freeze"/><br />
</circle><br />
</svg>
There are two problems with this:
1) WordPress converts the <animateTransform> element into a
<animatetransform> element. WordPress should at least preserve the case
of the element (whether this is on a whitelist of SVG elements or all
elements I don't care). List of SVG elements are here:
http://www.w3.org/TR/SVG11/eltindex.html
2) The extra <br /> elements. These are forgivable since the elements are
simply ignored by the browser's SVG parser.
Can someone confirm the behavior in WordPress 2.7.x?
--
Ticket URL: <http://core.trac.wordpress.org/ticket/9437>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list