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

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

index 2a4dc9a..4561599 100644 (file)
@@ -3964,7 +3964,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) {