diff --git a/lib/ext/Cite/index.js b/lib/ext/Cite/index.js index 21a31a4d7..ced0b512c 100644 --- a/lib/ext/Cite/index.js +++ b/lib/ext/Cite/index.js @@ -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) {