[BUGFIX] htmlArea RTE: Changing the text color to black does not work
authorStanislas Rolland <typo3@sjbr.ca>
Fri, 3 Feb 2012 02:18:24 +0000 (21:18 -0500)
committerStanislas Rolland <typo3@sjbr.ca>
Fri, 3 Feb 2012 02:19:18 +0000 (03:19 +0100)
Solution: Fix colorToHex conversion utility

Change-Id: I7707d756d9912208489584d993dbdee3dfa31eab
Resolves: #32877
Releases: 4.5, 4.6, 4.7
Reviewed-on: http://review.typo3.org/8820
Reviewed-by: Stanislas Rolland
Tested-by: Stanislas Rolland
typo3/sysext/rtehtmlarea/htmlarea/htmlarea.js

index f6f6b03..326dd4e 100644 (file)
@@ -5550,7 +5550,7 @@ HTMLArea.util.Color = function () {
                 * Returns hexadecimal color representation from a number or a rgb-style color.
                 */
                colorToHex: function(v) {
-                       if (!v) {
+                       if (typeof(v) === 'undefined' || v == null) {
                                return '';
                        }
                        function hex(d) {