From 3b32e7098610687165a2c0d4562d04d92ef20968 Mon Sep 17 00:00:00 2001 From: Tim Starling Date: Tue, 18 Apr 2006 02:48:48 +0000 Subject: [PATCH] Trim arguments before they are passed to the function hooks --- includes/Parser.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/includes/Parser.php b/includes/Parser.php index a5e5978b42..0a920e815e 100644 --- a/includes/Parser.php +++ b/includes/Parser.php @@ -2673,7 +2673,8 @@ class Parser if ( $colonPos !== false ) { $function = strtolower( substr( $part1, 1, $colonPos - 1 ) ); if ( isset( $this->mFunctionHooks[$function] ) ) { - $funcArgs = array_merge( array( &$this, substr( $part1, $colonPos + 1 ) ), $args ); + $funcArgs = array_map( 'trim', $args ); + $funcArgs = array_merge( array( &$this, trim( substr( $part1, $colonPos + 1 ) ) ), $funcArgs ); $result = call_user_func_array( $this->mFunctionHooks[$function], $funcArgs ); $found = true; if ( is_array( $result ) ) { -- 2.20.1