From d7db76de8cc00b874ece0eff4edf03050787e8b4 Mon Sep 17 00:00:00 2001 From: Krinkle Date: Sun, 12 Dec 2010 22:30:02 +0000 Subject: [PATCH] (mw.util.test) Escape the 'does return, the same way as the 'should return' (mw.html.escape() and spaces to non-breaking) --- resources/mediawiki.util/mediawiki.util.test.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/mediawiki.util/mediawiki.util.test.js b/resources/mediawiki.util/mediawiki.util.test.js index 693f209a34..7c4cc9dbd3 100644 --- a/resources/mediawiki.util/mediawiki.util.test.js +++ b/resources/mediawiki.util/mediawiki.util.test.js @@ -28,7 +28,7 @@ contain = result; } this.addedTests.push([code, result, contain]); - this.$table.append('' + mw.html.escape(code).replace(/ /g, '  ') + '' + mw.html.escape(result).replace(/ /g, '  ') + '?'); + this.$table.append('' + mw.html.escape(code).replace(/ /g, '  ') + '' + mw.html.escape(result).replace(/ /g, '  ') + '?'); }, /* Initialisation */ @@ -140,7 +140,7 @@ doesreturn = eval(exec); doesreturn = doesreturn + ' (' + typeof doesreturn + ')'; $thisrow = $testrows.eq(i + 1); - $thisrow.find('> td').eq(2).text(doesreturn); + $thisrow.find('> td').eq(2).html( mw.html.escape(doesreturn).replace(/ /g, '  ') ); if (doesreturn.indexOf(shouldcontain) !== -1) { if (doesreturn == shouldreturn){ -- 2.20.1