Match named entities with up to eight chars

The longest entries in
http://en.wikipedia.org/wiki/List_of_XML_and_HTML_character_entity_references.

Change-Id: I2c9f102fe6a905e339e12520d08c1b1b0a4002d8
This commit is contained in:
Gabriel Wicke 2012-06-29 23:15:30 +02:00
parent 370fb607c8
commit cf7f437966

View file

@ -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];