Forum closed. New forum available at

Uneven deletion of SPAN tags with inline styles

Support forum for WYMeditor.

Uneven deletion of SPAN tags with inline styles

Postby mark_ndg on Fri Feb 19, 2010 10:47 pm

I'm using WYMeditor in a CMS environment, where we are dealing with existing content created from other rich text editors, as well as content that has been copied and pasted from MSWord. I have encounted a possible bug in WYMeditor's handling of <span> tags with an inline style attribute:

When we open database content such as the following,
Code: Select all
<p>test <span style="font-weight:bold;">test</span> test</p>

and then save the content through WYMeditor, the <span> tag is replaced with an appropriate <strong> tag.
Code: Select all
<p>test <strong>test</strong> test</p>

However, if we use content where the style attribute does not have an equivalent html tag:
Code: Select all
<p>test <span style="text-transform:uppercase;">test</span> test</p>

the opening <span> tag is completely removed by WYMeditor, leaving an orphaned </span>.
Code: Select all
<p>test test</span> test</p>

Obviously, this is an issue.
This happens only with <span> tags. Other tags, such as <strong> or <em> are not affected.

Am I alone in this issue, or is this in fact a bug?
I searched the forum and didn't see anyone else with my issue; If this has been approached somewhere else, please direct me to the appropriate thread.

This is the latest WYMeditor release (0.5rc1)
Posts: 7
Joined: Tue Jan 27, 2009 9:14 pm

Re: Uneven deletion of SPAN tags with inline styles

Postby mr_lundis on Thu Apr 01, 2010 12:22 pm

Hi Mark!
This is definitely a bug, and as far as I'm aware it hasn't been addressed anywhere else. Ticket #207 opened. If you or anyone else feel like helping please drop a comment on the ticket, and also, please report any future bugs directly on the Trac site.

Cheers! ;)
Jonatan Lundin - designer, developer and forum moderator. You should follow me on Twitter!
Posts: 335
Joined: Sun Dec 02, 2007 10:59 am
Location: Sweden

Return to Support

Who is online

Users browsing this forum: No registered users and 2 guests