r91919 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r91918‎ | r91919 | r91920 >
Date:22:36, 11 July 2011
Author:tparscal
Status:deferred
Tags:
Comment:
Added escaping back into fitwords
Modified paths:
  • /trunk/parsers/wikidom/lib/es/es.TextFlow.js (modified) (history)

Diff [purge]

Index: trunk/parsers/wikidom/lib/es/es.TextFlow.js
@@ -342,7 +342,9 @@
343343 // Place "middle" directly in the center of "start" and "end"
344344 middle = Math.ceil( ( start + end ) / 2 );
345345 // Prepare the line for measurement using pre-escaped HTML
346 - ruler.innerHTML = this.content.substring( this.boundaries[offset], this.boundaries[middle] );
 346+ ruler.innerHTML = this.escape(
 347+ this.content.substring( this.boundaries[offset], this.boundaries[middle] )
 348+ );
347349 // Test for over/under using width of the rendered line
348350 if ( ruler.clientWidth > width ) {
349351 // Detect impossible fit (the first word won't fit by itself)
@@ -358,7 +360,9 @@
359361 }
360362 } while ( start < end );
361363 // Final measurment
362 - ruler.innerHTML = this.content.substring( this.boundaries[offset], this.boundaries[start] );
 364+ ruler.innerHTML = this.escape(
 365+ this.content.substring( this.boundaries[offset], this.boundaries[start] )
 366+ );
363367 return { 'end': start, 'width': ruler.clientWidth };
364368 };
365369

Status & tagging log