[BUGFIX] HTMLparser, treat fixAttrib.unset as boolean
authorMarkus Klein <klein.t3@mfc-linz.at>
Thu, 25 Aug 2011 18:12:37 +0000 (13:12 -0500)
committerJigal van Hemert <jigal@xs4all.nl>
Sun, 28 Aug 2011 14:51:11 +0000 (16:51 +0200)
HTMLparser_tags fixAttrib.unset is documented to be boolean, but is
currently treated as string.
This patch corrects for the expected behavior.

Change-Id: I608debf23280dd7d3816fe1ee05421cc88efc752
Resolves: #29246
Releases: 4.6, 4.5, 4.4, 4.3
Reviewed-on: http://review.typo3.org/4605
Reviewed-by: Christopher
Tested-by: Christopher
Reviewed-by: Egbert van der Hout
Reviewed-by: Björn Pedersen
Reviewed-by: Jigal van Hemert
Tested-by: Jigal van Hemert
t3lib/class.t3lib_parsehtml.php

index 78707a3..3ec610f 100644 (file)
@@ -825,7 +825,7 @@ class t3lib_parsehtml {
                                                                                if (strlen($params['set'])) {
                                                                                        $tagAttrib[0][$attr] = $params['set'];
                                                                                }
-                                                                               if (strlen($params['unset'])) {
+                                                                               if (isset($params['unset']) && !empty($params['unset'])) {
                                                                                        unset($tagAttrib[0][$attr]);
                                                                                }
                                                                                if (strcmp($params['default'], '') && !isset($tagAttrib[0][$attr])) {