From: Tim Starling Date: Sat, 26 Jan 2008 05:40:51 +0000 (+0000) Subject: Fixed #tag support for PPNode X-Git-Tag: 1.31.0-rc.0~49767 X-Git-Url: http://git.cyclocoop.org/%24href?a=commitdiff_plain;h=b211aaf8f0656a51832349410ecb1ec039ca45ad;p=lhc%2Fweb%2Fwiklou.git Fixed #tag support for PPNode --- diff --git a/includes/CoreParserFunctions.php b/includes/CoreParserFunctions.php index 4b836887a6..61dbafe551 100644 --- a/includes/CoreParserFunctions.php +++ b/includes/CoreParserFunctions.php @@ -245,14 +245,10 @@ class CoreParserFunctions { $attributes = array(); foreach ( $args as $arg ) { - if ( !$xpath ) { - $xpath = new DOMXPath( $arg->ownerDocument ); - } - $names = $xpath->query( 'name', $arg ); - if ( !$names->item( 0 )->hasAttributes() ) { - $name = $frame->expand( $names->item( 0 ), PPFrame::STRIP_COMMENTS ); - $values = $xpath->query( 'value', $arg ); - $value = trim( $frame->expand( $values->item( 0 ) ) ); + $bits = $arg->splitArg(); + if ( strval( $bits['index'] ) === '' ) { + $name = $frame->expand( $bits['name'], PPFrame::STRIP_COMMENTS ); + $value = trim( $frame->expand( $bits['value'] ) ); if ( preg_match( '/^(?:["\'](.+)["\']|""|\'\')$/s', $value, $m ) ) { $value = isset( $m[1] ) ? $m[1] : ''; }