Index: trunk/parsers/wikidom/lib/es/es.TextFlow.js |
— | — | @@ -342,7 +342,9 @@ |
343 | 343 | // Place "middle" directly in the center of "start" and "end" |
344 | 344 | middle = Math.ceil( ( start + end ) / 2 ); |
345 | 345 | // 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 | + ); |
347 | 349 | // Test for over/under using width of the rendered line |
348 | 350 | if ( ruler.clientWidth > width ) { |
349 | 351 | // Detect impossible fit (the first word won't fit by itself) |
— | — | @@ -358,7 +360,9 @@ |
359 | 361 | } |
360 | 362 | } while ( start < end ); |
361 | 363 | // 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 | + ); |
363 | 367 | return { 'end': start, 'width': ruler.clientWidth }; |
364 | 368 | }; |
365 | 369 | |