[BUGFIX] Broken links representation gets saved to the database
authorStanislas Rolland <typo3@sjbr.ca>
Mon, 15 Aug 2011 20:25:28 +0000 (16:25 -0400)
committerSusanne Moog <typo3@susannemoog.de>
Sun, 21 Aug 2011 18:10:34 +0000 (20:10 +0200)
Solution: Avoid wrapping the a tag with span tag when style attribute
is set when rteerror attribute is also set.

Change-Id: I0f517b9f01deec05c9d31661a5fcf13f60ea0d37
Resolves: #25302
Releases: 4.4, 4.5, 4.6
Reviewed-on: http://review.typo3.org/4351
Reviewed-by: Georg Ringer
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
Reviewed-by: Susanne Moog
Tested-by: Susanne Moog
t3lib/class.t3lib_parsehtml_proc.php

index 29b59b8..25f7974 100644 (file)
@@ -884,7 +884,8 @@ class t3lib_parsehtml_proc extends t3lib_parsehtml {
                foreach ($blockSplit as $k => $v) {
                        if ($k % 2) { // If an A-tag was found:
                                $attribArray = $this->get_tag_attributes_classic($this->getFirstTag($v), 1);
-                               if ($attribArray['style']) { // If "style" attribute is set!
+                                       // If "style" attribute is set and rteerror is not set!
+                               if ($attribArray['style'] && !$attribArray['rteerror']) {
                                        $attribArray_copy['style'] = $attribArray['style'];
                                        unset($attribArray['style']);
                                        $bTag = '<span ' . t3lib_div::implodeAttributes($attribArray_copy, 1) . '><a ' . t3lib_div::implodeAttributes($attribArray, 1) . '>';