Item9336: Manage.pm seems to have a very odd idea of what a valid htmlColor is

pencil
Priority: Normal
Current State: Closed
Released In: 1.1.0
Target Release: minor
Applies To: Engine
Component:
Branches:
Reported By: SvenDowideit
Waiting For:
Last Change By: KennethLavrsen
sub _isValidHTMLColor {
    my $c = shift;
    return $c =~
m/^(#[0-9a-f]{6}|black|silver|gray|white|maroon|red|purple|fuchsia|green|lime|olive|yellow|navy|blue|teal|aqua)/i;

}

doesn't even seem to contain the pretty normal lightblue, darkblue variations, let alone the reality that there aren't that many that we can't get it right.

basically, the list of 16 is the html4 spec - but browsers have been more intellegent for years.

see http://www.w3.org/TR/REC-html40/types.html#h-6.5

what about rgb() and from css3, hsl()&hsla(), html 5, there's also rgba()

-- SvenDowideit - 16 Jul 2010

added the extended color set - apparently its been in universal use for the last 5 years - and its a real pain to discover that a color name you're used to using causes foswiki to refuse to create a web.

-- SvenDowideit - 21 Jul 2010

 

ItemTemplate edit

Summary Manage.pm seems to have a very odd idea of what a valid htmlColor is
ReportedBy SvenDowideit
Codebase trunk
SVN Range
AppliesTo Engine
Component
Priority Normal
CurrentState Closed
WaitingFor
Checkins distro:242d2d20a836
TargetRelease minor
ReleasedIn 1.1.0
Topic revision: r6 - 04 Oct 2010, KennethLavrsen
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy