forked from extern/egroupware
run wrong values in error message through htmlspecialchars()
This commit is contained in:
parent
9752dbb70a
commit
5c07584db0
@ -35,7 +35,7 @@ foreach(array('width'=>1,'height'=>1,'color1'=>'000080','color2'=>'ffffff') as $
|
||||
foreach(array('color1','color2') as $name)
|
||||
{
|
||||
preg_match('/^#?([0-9A-Fa-f]{2})([0-9A-Fa-f]{2})([0-9A-Fa-f]{2})$/',$$name,$rgb) or
|
||||
die("Wrong value '".$$name."' for $name, should be something like #80FFFF' !!!");
|
||||
die("Wrong value '".htmlspecialchars($$name)."' for $name, should be something like #80FFFF' !!!");
|
||||
|
||||
$$name = array('r'=>hexdec($rgb[1]),'g'=>hexdec($rgb[2]),'b'=>hexdec($rgb[3]));
|
||||
}
|
||||
|
@ -41,7 +41,7 @@ imagecolortransparent($image, $white);
|
||||
foreach(array('color','bgcolor') as $name)
|
||||
{
|
||||
preg_match('/^#?([0-9A-Fa-f]{2})([0-9A-Fa-f]{2})([0-9A-Fa-f]{2})$/',$$name,$rgb) or
|
||||
die("Wrong value '".$$name."' for $name, should be something like #80FFFF' !!!");
|
||||
die("Wrong value '".htmlspecialchars($$name)."' for $name, should be something like #80FFFF' !!!");
|
||||
|
||||
$$name = imagecolorallocate($image,hexdec($rgb[1]),hexdec($rgb[2]),hexdec($rgb[3]));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user