Closed Bug 947579 Opened 11 years ago Closed 10 years ago

Strange things happen to headings whose text is "content"

Categories

(developer.mozilla.org Graveyard :: Editing, defect)

x86
macOS
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: wbamberg, Unassigned)

Details

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".
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
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Product: developer.mozilla.org → developer.mozilla.org Graveyard
You need to log in before you can comment on or make changes to this bug.