Broken links representation gets saved to the database
Imagine that you have a content element with a link to a internal page that does not exist anymore. On editing this content element, RTEhtmlarea marks this link with yellow background and a red border.
On saving the form without touching the content in the RTE at all, the styles used for representing this broken link are saved to the database and then get wrapped by an addition span tag.
So, on saving again one will end out in something like this:
< p >< em > < span style="background-color: yellow; border:2px red solid; color: black;" > < a style="background-color: yellow; border:2px red solid; color: black;" rteerror="No page found: 2913" title="Opens internal link in current window" class="internal-link" href="http://dev45.local/?id=99999" >TEST< /a > < /span > < /em >< /p >
(issue imported from #M17917)
Updated by Oliver Hader about 10 years ago
This is a tricky one. The call to TS_transform_db() in t3lib_parsehtml_proc will add the span tag around the anchor. The call to TS_links_db() would have removed the rteerror and style attributes of that broken anchor tag. However, since TS_links_db() is called after TS_transform_db() the span tag is already there.
So my patch just changes the order of processing the modes, to have ts_links before ts_transform/css_transform. I'm not an expert on the ParseHtml class and thus also don't know about negative side-effects.