r61428 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r61427‎ | r61428 | r61429 >
Date:19:40, 23 January 2010
Author:nikerabbit
Status:ok
Tags:
Comment:
Decode html entities that Google returns occassionally
Modified paths:
  • /trunk/extensions/Translate/utils/TranslationHelpers.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Translate/utils/TranslationHelpers.php
@@ -246,7 +246,7 @@
247247 return null;
248248 }
249249 if ( $response->responseStatus === 200 ) {
250 - $text = $this->suggestionField( $response->responseData->translatedText );
 250+ $text = $this->suggestionField( Sanitizer::decodeCharReferences( $response->responseData->translatedText ) );
251251 return Html::rawElement( 'div', null, self::legend('Google') . $text . self::clear() );
252252 } elseif( $response->responseDetails === 'invalid translation language pair' ) {
253253 $unsupported[$code] = true;

Status & tagging log