Index: trunk/extensions/Spark/Spark.hooks.php |
— | — | @@ -44,7 +44,7 @@ |
45 | 45 | } |
46 | 46 | |
47 | 47 | $tag = new SparkTag( $args, $input ); |
48 | | - return $tag->render(); |
| 48 | + return $tag->render( $parser ); |
49 | 49 | } |
50 | 50 | |
51 | 51 | } |
\ No newline at end of file |
Index: trunk/extensions/Spark/Spark.class.php |
— | — | @@ -41,17 +41,21 @@ |
42 | 42 | * |
43 | 43 | * @since 0.1 |
44 | 44 | * |
| 45 | + * @param Parser $parser |
| 46 | + * |
45 | 47 | * @return string |
46 | 48 | */ |
47 | | - public function render() { |
| 49 | + public function render( Parser $parser ) { |
48 | 50 | if ( array_key_exists( 'data-spark-query', $this->parameters ) ) { |
49 | 51 | $query = htmlspecialchars( $this->parameters['data-spark-query'] ); |
50 | 52 | $query = str_replace( array( '<', '>' ), array( '<', '>' ), $query ); |
51 | 53 | unset( $this->parameters['data-spark-query'] ); |
52 | 54 | |
53 | | - return '<div class="spark" data-spark-query="' . $query . '" ' . Html::expandAttributes( $this->parameters ) . ' >' . |
| 55 | + $html = '<div class="spark" data-spark-query="' . $query . '" ' . Html::expandAttributes( $this->parameters ) . ' >' . |
54 | 56 | ( is_null( $this->contents ) ? '' : htmlspecialchars( $this->contents ) ) . |
55 | | - '</div>'; |
| 57 | + '</div>'; |
| 58 | + |
| 59 | + return array( $parser->insertStripItem( $html, $parser->mStripState ), 'noparse' => true, 'isHTML' => true ); |
56 | 60 | } |
57 | 61 | else { |
58 | 62 | return Html::element( 'i', array(), wfMsg( 'spark-missing-query' ) ); |