mirror of
https://github.com/ezyang/htmlpurifier.git
synced 2025-01-05 06:01:52 +00:00
[3.1.0] float -> int
git-svn-id: http://htmlpurifier.org/svnroot/htmlpurifier/trunk@1605 48356398-32a2-884e-a903-53898d9a118a
This commit is contained in:
parent
6cdcc8b8e1
commit
e21e9b23ad
1
NEWS
1
NEWS
@ -70,6 +70,7 @@ NEWS ( CHANGELOG and HISTORY ) HTMLPurifier
|
|||||||
from HTML Purifier output)
|
from HTML Purifier output)
|
||||||
. HTMLPurifier_ConfigSchema->validate() deprecated in favor of
|
. HTMLPurifier_ConfigSchema->validate() deprecated in favor of
|
||||||
HTMLPurifier_VarParser->parse()
|
HTMLPurifier_VarParser->parse()
|
||||||
|
. Integers auto-cast into float type by VarParser.
|
||||||
|
|
||||||
3.0.0, released 2008-01-06
|
3.0.0, released 2008-01-06
|
||||||
# HTML Purifier is PHP 5 only! The 2.1.x branch will be maintained
|
# HTML Purifier is PHP 5 only! The 2.1.x branch will be maintained
|
||||||
|
@ -24,7 +24,7 @@ class HTMLPurifier_VarParser_Flexible extends HTMLPurifier_VarParser
|
|||||||
if (is_string($var) && ctype_digit($var)) $var = (int) $var;
|
if (is_string($var) && ctype_digit($var)) $var = (int) $var;
|
||||||
return $var;
|
return $var;
|
||||||
case 'float':
|
case 'float':
|
||||||
if (is_string($var) && is_numeric($var)) $var = (float) $var;
|
if ((is_string($var) && is_numeric($var)) || is_int($var)) $var = (float) $var;
|
||||||
return $var;
|
return $var;
|
||||||
case 'bool':
|
case 'bool':
|
||||||
if (is_int($var) && ($var === 0 || $var === 1)) {
|
if (is_int($var) && ($var === 0 || $var === 1)) {
|
||||||
|
Loading…
Reference in New Issue
Block a user