From: Tim Starling Date: Tue, 25 Mar 2008 05:57:16 +0000 (+0000) Subject: allow spaces in numeric image parameters for b/c X-Git-Tag: 1.31.0-rc.0~48831 X-Git-Url: https://git.cyclocoop.org/%7B%24admin_url%7Dmembres/modifier.php?a=commitdiff_plain;h=b03e5cdc12681cebb66c39259166bb2a344fad39;p=lhc%2Fweb%2Fwiklou.git allow spaces in numeric image parameters for b/c --- diff --git a/includes/Parser.php b/includes/Parser.php index 1fcaccd027..1c07daf958 100644 --- a/includes/Parser.php +++ b/includes/Parser.php @@ -4427,7 +4427,7 @@ class Parser $params[$type]['width'] = intval( $m[1] ); $params[$type]['height'] = intval( $m[2] ); $validated = true; - } elseif ( is_numeric( $value ) ) { + } elseif ( is_numeric( trim( $value ) ) ) { $params[$type]['width'] = intval( $value ); $validated = true; } // else no validation -- bug 13436 @@ -4437,7 +4437,7 @@ class Parser $validated = $handler->validateParam( $paramName, $value ); } else { # Validate internal parameters - $validated = ( $value === false || is_numeric( $value ) ); + $validated = ( $value === false || is_numeric( trim( $value ) ) ); } if ( $validated ) {