r99853 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r99852‎ | r99853 | r99854 >
Date:08:56, 15 October 2011
Author:jeroendedauw
Status:deferred
Tags:
Comment:
better escaping
Modified paths:
  • /trunk/extensions/SemanticResultFormats/jqPlot/SRF_jqPlotBar.php (modified) (history)
  • /trunk/extensions/SemanticResultFormats/jqPlot/SRF_jqPlotPie.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticResultFormats/jqPlot/SRF_jqPlotPie.php
@@ -157,11 +157,13 @@
158158 END;
159159 $wgOut->addScript( $js_pie );
160160
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+ );
166168 }
167169
168170 public function getParameters() {
Index: trunk/extensions/SemanticResultFormats/jqPlot/SRF_jqPlotBar.php
@@ -258,11 +258,14 @@
259259 </script>
260260 END;
261261 $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+ );
267270 }
268271
269272 public function getParameters() {