Index: trunk/extensions/SemanticResultFormats/jqPlot/SRF_jqPlotPie.php |
— | — | @@ -157,11 +157,13 @@ |
158 | 158 | END; |
159 | 159 | $wgOut->addScript( $js_pie ); |
160 | 160 | |
161 | | - $text =<<<END |
162 | | -<div id="$pieID" style="margin-top: 20px; margin-left: 20px; width: {$this->m_width}px; height: {$this->m_height}px;"></div> |
163 | | - |
164 | | -END; |
165 | | - return $text; |
| 161 | + return Html::element( |
| 162 | + 'div', |
| 163 | + array( |
| 164 | + 'id' => $pieID, |
| 165 | + 'style' => Sanitizer::checkCss( "margin-top: 20px; margin-left: 20px; width: {$this->m_width}px; height: {$this->m_height}px;" ) |
| 166 | + ) |
| 167 | + ); |
166 | 168 | } |
167 | 169 | |
168 | 170 | public function getParameters() { |
Index: trunk/extensions/SemanticResultFormats/jqPlot/SRF_jqPlotBar.php |
— | — | @@ -258,11 +258,14 @@ |
259 | 259 | </script> |
260 | 260 | END; |
261 | 261 | $wgOut->addScript( $js_bar ); |
262 | | - $text =<<<END |
263 | | -<div id="$barID" style="margin-top: 20px; margin-left: 20px; width: {$this->m_width}px; height: {$this->m_height}px;"></div> |
264 | | - |
265 | | -END; |
266 | | - return $text; |
| 262 | + |
| 263 | + return Html::element( |
| 264 | + 'div', |
| 265 | + array( |
| 266 | + 'id' => $barID, |
| 267 | + 'style' => Sanitizer::checkCss( "margin-top: 20px; margin-left: 20px; width: {$this->m_width}px; height: {$this->m_height}px;" ) |
| 268 | + ) |
| 269 | + ); |
267 | 270 | } |
268 | 271 | |
269 | 272 | public function getParameters() { |