Fixed problems with HTML entity handling

This commit is contained in:
Jeremy Ruston
2011-12-08 12:38:08 +00:00
parent 25bf2fc330
commit ef60c9018e
6 changed files with 36 additions and 7 deletions

View File

@@ -693,10 +693,10 @@ WikiTextRules.rules = [
{
name: "htmlEntitiesEncoding",
match: "(?:(?:&#?[a-zA-Z0-9]{2,8};|.)(?:&#?(?:x0*(?:3[0-6][0-9a-fA-F]|1D[c-fC-F][0-9a-fA-F]|20[d-fD-F][0-9a-fA-F]|FE2[0-9a-fA-F])|0*(?:76[89]|7[7-9][0-9]|8[0-7][0-9]|761[6-9]|76[2-7][0-9]|84[0-3][0-9]|844[0-7]|6505[6-9]|6506[0-9]|6507[0-1]));)+|&#?[a-zA-Z0-9]{2,8};)",
match: "&#?[a-zA-Z0-9]{2,8};",
handler: function(w)
{
w.output.push({type: "text", value: w.matchText});
w.output.push({type: "entity", value: w.matchText});
}
}