Skip to content

Commit

Permalink
Bug 775292 - Bug 679895 regressed Tables of Contents for API document…
Browse files Browse the repository at this point in the history
…s; r=@Mossop

(cherry picked from commit 1887e49)
  • Loading branch information
Will Bamberg authored and Wes Kocher committed Jul 31, 2012
1 parent c8d9ad5 commit 4dfc2b6
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions doc/static-files/js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,8 @@ function run(jQuery) {
headingIDExists = headingIDs.indexOf(suffixedName) != -1;
}
headingIDs.push(suffixedName);
suffixedName = suffixedName.replace(/ /g, '_');
var encodedName = encodeURIComponent(suffixedName);
// Now add the ID attribute and ToC entry
$(this).attr("id", encodedName);
// Now add the ID attribute
$(this).attr("id", suffixedName);
});
}

Expand All @@ -71,7 +69,7 @@ function run(jQuery) {
document.location.search;

$(headings).each(function(i) {
var url = pageURL + "#" + $(this).attr("id");
var url = pageURL + "#" + encodeURIComponent($(this).attr("id"));
var tocEntry = $("<a></a>").attr({
href: url,
"class": $(this).attr("tagName")
Expand Down

0 comments on commit 4dfc2b6

Please sign in to comment.