diff --git a/modules/parser/mediawiki.WikitextSerializer.js b/modules/parser/mediawiki.WikitextSerializer.js index f51c6373bb..af7b4f92c7 100644 --- a/modules/parser/mediawiki.WikitextSerializer.js +++ b/modules/parser/mediawiki.WikitextSerializer.js @@ -191,7 +191,7 @@ WSP.escapeWikiText = function ( state, text ) { // modified for now. outTexts.push( token.dataAttribs.src // escape ampersands in entity text - .replace(/&(#?[0-9a-zA-Z]{2,6};)/, '&$1') ); + .replace(/&(#?[0-9a-zA-Z]{2,8};)/, '&$1') ); // skip generated tokens for ( ; i < l; i ++) { var tk = tokens[i]; @@ -652,6 +652,7 @@ WSP.tagHandlers = { pre: { start: { startsNewline: true, + pairSepNLCount: 2, handle: function( state, token ) { state.inIndentPre = true; state.textHandler = function( t ) {