Strange things happen to headings whose text is "content"

RESOLVED FIXED

Status

RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: wbamberg, Unassigned)

Tracking

Details

(Reporter)

Description

5 years ago
See https://developer.mozilla.org/en-US/docs/User:wbamberg/Macros/Source. This page contains just this:

<h2>content</h2>

i.e. a heading with the name "content". The Wiki generates some strange markup in there:

<h2 id="content"><a class="edit-section" data-section-id="content" data-section-src-url="/en-US/docs/User:wbamberg/Macros/Source?raw=true&amp;section=content" href="/en-US/docs/User:wbamberg/Macros/Source$edit?section=content&amp;edit_links=true" title="Edit section">Edit</a>content</h2>

This also has the effect of making the heading really big. I'm guessing that it automatically gives the header an ID matching the heading text, but the ID "content" has a special meaning for the Wiki.

This is a real use case for me! One of the properties of the SDK Request class is called "content".

Comment 1

5 years ago
Commits pushed to master at https://github.com/mozilla/kuma

https://github.com/mozilla/kuma/commit/9f467693a8f4d25ff638791184b3bc58bc9edab7
fix bug 947579 - Update content specificity to avoid content collision

https://github.com/mozilla/kuma/commit/e1e40a996acde5fa5f80a4c4f7e842d1b8f1ef76
Merge pull request #1737 from darkwing/content-block-id

fix bug 947579 - Update content specificity to avoid content collision

Updated

5 years ago
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.