goodcui / owaspantisamy

Automatically exported from code.google.com/p/owaspantisamy
0 stars 0 forks source link

Combine color regular expressions #38

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
For clarity, recommend changing color regular expressions (currently
colorCodeOrName and cssColor) to separate, distinct regular expressions
that can be reused by all HTML tags/CSS properties.

Proposed Breakdown:
colorName (color names defined by HTML/CSS Spec):
(aqua|black|blue|fuchsia|gray|grey|green|lime|maroon|navy|olive|purple|red|silve
r|teal|white|yellow)

colorCode (color by hex - HTML + CSS): #[[0-9][0-9a-fA-F]?]{3} --- need to
check the format of this regular expression but the idea is that #000
should be valid for black

rgbCode (CSS only):
rgb\(([1]?[0-9]{1,2}|2[0-4][0-9]|25[0-5]),([1]?[0-9]{1,2}|2[0-4][0-9]|25[0-5]),(
[1]?[0-9]{1,2}|2[0-4][0-9]|25[0-5])\)
--- basically 0-255 for each of R/G/B

Original issue reported on code.google.com by li.jaso...@gmail.com on 14 Mar 2009 at 8:11

GoogleCodeExporter commented 9 years ago
Regular expressions have been modified per original comment.

Also added an additional regular expression for "system colors" as defined by 
the CSS
spec.

Modified all HTML tags that accepted colorCodeOrName to now use colorCode and
colorName. Likewise, all CSS properties that accepted cssColor now use 
colorCode,
colorName, rgbCode, and systemColor.

Original comment by li.jaso...@gmail.com on 17 Mar 2009 at 3:57

GoogleCodeExporter commented 9 years ago

Original comment by arshan.d...@gmail.com on 3 Aug 2009 at 2:45