mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Cite
synced 2024-12-01 01:56:20 +00:00
Update Parsoid to generate modern HTML5 IDs w/ legacy fallback
The citation portion contains fixes for []-encoding in attributes, based on Iec3439f76ecc2a3543b30b35f8735c92b0cfb711. Fix some other no- or double-encoding issues with HTML entities in the process, based on I88e8e2077e6f5eec2b232391f7818370894a62dc (T103714/T104196). Unrelated parsertest fix which needed an id fix -- incorrect id added by the section-tag patches exposed here. Bug: T152540 Bug: T103714 Change-Id: I12b2a148f7170d20bd9aacd3b5b8ee1965859592
This commit is contained in:
parent
d188af60d0
commit
228325cb09
|
@ -181,8 +181,11 @@ 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.
|
||||
// It also considers entities equal to their encoding (i.e. '&' === '&').
|
||||
return Sanitizer.escapeId(val, { noninitial: true });
|
||||
// It also considers entities equal to their encoding
|
||||
// (i.e. '&' === '&'), which is done:
|
||||
// in PHP: Sanitizer#decodeTagAttributes and
|
||||
// in Parsoid: ExtensionHandler#normalizeExtOptions
|
||||
return Sanitizer.escapeIdForAttribute(val);
|
||||
}
|
||||
|
||||
RefGroup.prototype.renderLine = function(env, refsList, ref) {
|
||||
|
|
Loading…
Reference in a new issue