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

Change-Id: I1f68a0f9a67934b9ac3288117f831219e8d30f99
Resolves: #25302
Releases: 4.4, 4.5, 4.6
Reviewed-on: http://review.typo3.org/4352
Reviewed-by: Susanne Moog
Tested-by: Susanne Moog
t3lib/class.t3lib_parsehtml_proc.php

index 2cfc6d2..cae95ac 100644 (file)
@@ -931,7 +931,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) . '>';