mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-15 10:35:48 +00:00
Escape ampersands in entities from plain text DOM content
Change-Id: I0826077cf48b67e38a525090be66411c38d7b65f
This commit is contained in:
parent
5874d9a5f1
commit
6c8dfa26fa
|
@ -189,7 +189,9 @@ WSP.escapeWikiText = function ( state, text ) {
|
|||
// push out the original source
|
||||
// XXX: This assumes the content was not
|
||||
// modified for now.
|
||||
outTexts.push( token.dataAttribs.src );
|
||||
outTexts.push( token.dataAttribs.src
|
||||
// escape ampersands in entity text
|
||||
.replace(/&(#?[0-9a-zA-Z]{2,6};)/, '&$1') );
|
||||
// skip generated tokens
|
||||
for ( ; i < l; i ++) {
|
||||
var tk = tokens[i];
|
||||
|
|
Loading…
Reference in a new issue