T58916: Parse extension parameters as plain text

Also encode cite ids properly as now they can contain arbitrary
text. Change in blacklist due to this.

TODO: Investigate if it would be better to do this directly in
the tokenizer.

Change-Id: Ic112124e90d256d73a351d0d57fe3c7546fa065f
This commit is contained in:
Marc Ordinas i Llopis 2014-12-19 19:50:20 +01:00 committed by Subramanya Sastry
parent 9e6055d547
commit 3c82fb7787

View file

@ -154,7 +154,8 @@ function makeValidIdAttr(val) {
// Looks like Cite.php doesn't try to fix ids that already have
// a "_" in them. Ex: name="a b" and name="a_b" are considered
// identical. Not sure if this is a feature or a bug.
return val.replace(/\s/g, '_');
// It also encodes them and then substitutes '%' with '.'.
return encodeURIComponent(val.replace(/\s/g, '_')).replace(/%/g, '.');
}
RefGroup.prototype.add = function(references, refName, about, skipLinkback) {