Index: trunk/extensions/HtmlUi/classes/HtmlUiTemplate.php |
— | — | @@ -46,6 +46,11 @@ |
47 | 47 | public function render( array $data = array() ) { |
48 | 48 | // Expand bindings to vars, just for this scope - escaped by default! |
49 | 49 | extract( self::escape( $data ) ); |
| 50 | + // If $data had an element keyed as "data", then it's been shadowed, otherwise we need to |
| 51 | + // unset it so the template doesn't start using the unescaped $data variable |
| 52 | + if ( !isset( $data['data'] ) ) { |
| 53 | + unset( $data ); |
| 54 | + } |
50 | 55 | ob_start(); |
51 | 56 | require( $this->filePath ); |
52 | 57 | return ob_get_clean(); |