r59902 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r59901‎ | r59902 | r59903 >
Date:21:14, 9 December 2009
Author:tparscal
Status:ok
Tags:
Comment:
Using append() rather than html() is making IE no longer crash. New lines are a bit wonky though.
Modified paths:
  • /trunk/extensions/UsabilityInitiative/js/plugins/jquery.wikiEditor.js (modified) (history)

Diff [purge]

Index: trunk/extensions/UsabilityInitiative/js/plugins/jquery.wikiEditor.js
@@ -330,7 +330,7 @@
331331 context.$content = $( context.$iframe[0].contentWindow.document.body );
332332 // We need to properly escape any HTML entities like &, < and > so they end up as visible
333333 // characters rather than actual HTML tags in the code editor container.
334 - context.$content.html( $( '<div />' ).text( context.$textarea.val() ).html() );
 334+ context.$content.append( $( '<div />' ).text( context.$textarea.val() ).html() );
335335 // Reflect direction of parent frame into child
336336 if ( $( 'body' ).is( '.rtl' ) ) {
337337 context.$content.addClass( 'rtl' ).attr( 'dir', 'rtl' );

Follow-up revisions

RevisionCommit summaryAuthorDate
r59904UsabilityInitiative: Fix code preventing CSS from being added twice, recombin...catrope21:24, 9 December 2009

Status & tagging log