r55476 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r55475‎ | r55476 | r55477 >
Date:12:13, 22 August 2009
Author:nikerabbit
Status:ok
Tags:
Comment:
Fix double escapings, styles still broken for ajax edit
Modified paths:
  • /trunk/extensions/Translate/utils/TranslationEditPage.php (modified) (history)
  • /trunk/extensions/Translate/utils/TranslationHelpers.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Translate/utils/TranslationEditPage.php
@@ -48,7 +48,7 @@
4949 'class' => 'mw-translate-edit-area',
5050 'rows' => $short ? 2: 10,
5151 );
52 - $textarea = Html::element( 'textarea', $textareaParams, htmlspecialchars($translation) );
 52+ $textarea = Html::element( 'textarea', $textareaParams, $translation );
5353
5454 $hidden = array();
5555 $hidden[] = Xml::hidden( 'title', $this->getTitle()->getPrefixedDbKey() );
@@ -68,7 +68,7 @@
6969 'method' => 'post',
7070 );
7171
72 - $form = Html::element( 'form', $formParams,
 72+ $form = Html::rawElement( 'form', $formParams,
7373 implode( "\n", $hidden ) . "\n" .
7474 $helpers->getBoxes() . "\n" .
7575 "$textarea\n$summary$save"
Index: trunk/extensions/Translate/utils/TranslationHelpers.php
@@ -114,7 +114,7 @@
115115 }
116116
117117 if ( count($boxes) ) {
118 - return Html::element( 'div', array( 'class' => 'mw-sp-translate-edit-fields' ), implode( "\n\n", $boxes ) );
 118+ return Html::rawElement( 'div', array( 'class' => 'mw-sp-translate-edit-fields' ), implode( "\n\n", $boxes ) );
119119 } else {
120120 throw new MWException( "no boxes" );
121121 }
@@ -152,7 +152,7 @@
153153
154154 $text = TranslateUtils::convertWhiteSpaceToHTML( $text );
155155 $params = array( 'class' => 'mw-sp-translate-edit-tmsug', 'title' => $s['source'] );
156 - $boxes[] = Html::element( 'div', $params, self::legend( $label ) . $text . self::clear() );
 156+ $boxes[] = Html::rawElement( 'div', $params, self::legend( $label ) . $text . self::clear() );
157157 }
158158 }
159159
@@ -187,7 +187,7 @@
188188 wfMsg( 'word-separator') .
189189 wfMsg( 'parentheses', $title );
190190
191 - $msg = Html::element( 'span',
 191+ $msg = Html::rawElement( 'span',
192192 array( 'class' => 'mw-translate-edit-deftext' ),
193193 TranslateUtils::convertWhiteSpaceToHTML( $en )
194194 );
@@ -255,7 +255,7 @@
256256
257257 $text = TranslateUtils::convertWhiteSpaceToHTML( $text );
258258 $params = array( 'class' => 'mw-translate-edit-item' );
259 - $boxes[] = Html::element( 'div', $params, self::legend( $label ) . $text . self::clear() );
 259+ $boxes[] = Html::rawElement( 'div', $params, self::legend( $label ) . $text . self::clear() );
260260 }
261261
262262 if ( count($boxes) ) {
@@ -309,7 +309,7 @@
310310 }
311311
312312 protected static function legend( $label ) {
313 - return Html::element( 'div', array( 'class' => 'mw-translate-legend' ), $label );
 313+ return Html::rawElement( 'div', array( 'class' => 'mw-translate-legend' ), $label );
314314 }
315315
316316 protected static function clear() {

Status & tagging log