[Webkit-unassigned] [Bug 50308] Reject named colors, accept only #rrggbb in <input type=color />
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Tue Nov 30 21:43:17 PST 2010
https://bugs.webkit.org/show_bug.cgi?id=50308
--- Comment #2 from Kent Tamura <tkent at chromium.org> 2010-11-30 21:43:17 PST ---
(From update of attachment 75247)
View in context: https://bugs.webkit.org/attachment.cgi?id=75247&action=review
> WebCore/html/ColorInputType.cpp:53
> }
> - // This accepts named colors such as "white".
> - // FIXME: Reject named colors, accept only #rrggbb.
> - Color color(value);
> - return color.isValid() && !color.hasAlpha();
> + return false;
> }
We prefer early exit. So this should be
if (value[0] != '#')
return false;
// We don't accept #rgb .....
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list