Issue Bug Closed

#51943Quotes in RTE link title break HTML output

Alexander Stehlik 09/12/13, 12:45 updated 06/11/15, 01:04

Description

Used link title:

Opens "external link" in new window

Link Tag in RTE after creating it in the linkbrowser:

<a href="http://www.google.de" class="external-link-new-window" title="Opens &quot;external link&quot; in new window" data-htmlarea-external="1">
Linktext
</a>

After saving the content element:

<a href="http://www.google.de" class="external-link-new-window" title="Opens &quot;external link" data-htmlarea-external="1">
Linktext
</a>

Output in the Frontend:

<a href="http://www.google.de" title="Opens "external link" target="_blank" class="external-link-new-window" >
Linktext
</a>

Note the three quotes after the title tag (not escaped!).

This value is stored in the database:

<link http://www.google.de - external-link-new-window "Opens "external link" in new window">Linktext</link>

The problem is, that the transformation (ts_css) is removing the HTML special chars from all attribute values, see \TYPO3\CMS\Core\Html\RteHtmlParser->TS_links_db():

$attribArray = $this->get_tag_attributes_classic($this->getFirstTag($v), 1);

A possible solution would be to keep the HTML special chars in the databse and to remove the calls at the end of htmlspecialchars in \TYPO3\CMS\Core\Html\RteHtmlParser->TS_links_rte().

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.