[BUGFIX] RTE: itemscope, itemtype, itemprop not working in span tag 07/33207/8
authorStanislas Rolland <typo3@sjbr.ca>
Thu, 6 Nov 2014 23:14:06 +0000 (18:14 -0500)
committerBenjamin Mack <benni@typo3.org>
Thu, 29 Jan 2015 14:15:33 +0000 (15:15 +0100)
Default PageTsConfig is incorrect when features using the style
attribute are enabled. Hardcoded list of attributes allowed on span tag
in RTE parser misses those attributes.

Releases: master, 6.2
Resolves: #61805
Change-Id: I0fb57aaaa76e595b2f9bf24df3942d826acd3c27
Reviewed-on: http://review.typo3.org/33207
Reviewed-by: Andreas Fernandez <andreas.fernandez@aspedia.de>
Reviewed-by: Stanislas Rolland <typo3@sjbr.ca>
Tested-by: Stanislas Rolland <typo3@sjbr.ca>
Tested-by: Benjamin Mack <benni@typo3.org>
typo3/sysext/core/Classes/Html/RteHtmlParser.php
typo3/sysext/rtehtmlarea/Configuration/PageTS/Style/pageTSConfig.txt

index b9329dc..39c8d09 100644 (file)
@@ -1192,7 +1192,7 @@ class RteHtmlParser extends \TYPO3\CMS\Core\Html\HtmlParser {
                                        if (isset($keepTags['span'])) {
                                                $classes = array_merge(array(''), $this->allowedClasses);
                                                $keepTags['span'] = array(
-                                                       'allowedAttribs' => 'id,class,style,title,lang,xml:lang,dir',
+                                                       'allowedAttribs' => 'id,class,style,title,lang,xml:lang,dir,itemscope,itemtype,itemprop',
                                                        'fixAttrib' => array(
                                                                'class' => array(
                                                                        'list' => $classes,
index c40b382..d6b5924 100644 (file)
@@ -15,7 +15,7 @@ RTE.default.proc {
                tags {
                                ## CLEAN ATTRIBUTES ON THE FOLLOWING TAGS
                        span.fixAttrib.style.unset >
-                       span.allowedAttribs = id, title, dir, lang, xml:lang, class, style
+                       span.allowedAttribs := addToList(style)
                        p.allowedAttribs := addToList(style)
                        div < .p
                        hr.allowedAttribs := addToList(style)