I have an inline markup editor built into my website, which should produce XHTML compliant markup. But as you can see, it uses the deprecated font
tag and size
attribute.
<font style="font-family: Courier New; color: rgb(0, 0, 153);" size="2">
asdfa
<span style="color: rgb(0, 51, 0);">
a
<font size="5">fds</font>
</span>
</font>
On other browsers, it produces the <span class="Apple-style-span" style="font-size: xx-large;">
instead of <font size="5">
Is there a Javascript/Regex solution to taking the first set of markup and replacing it with XHTML compliant markup using style
attribute and span
tag.
Thanks in advance!!
(ps. jQuery can be used too)