Closed Bug 780688 Opened 12 years ago Closed 9 years ago

Remove raw HTML links from code examples

Categories

(Developer Documentation Graveyard :: General, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WORKSFORME

People

(Reporter: ytpete, Unassigned)

References

Details

(Whiteboard: u=mdn p=0 c=General)

User Agent: Mozilla/5.0 (Windows NT 5.1) AppleWebKit/537.1 (KHTML, like Gecko) Chrome/21.0.1180.60 Safari/537.1

Steps to reproduce:

(This is with the new "beta" MDN)

1. Visit https://developer.mozilla.org/en-US/docs/DOM/Creating_and_triggering_events
2. Wait a second or two


Actual results:

The docs look fine initially, but after a second the JS code snippet changes to show embedded HTML markup in place of links to other docs.

For example, the second line reads:
var evt = document.<a href="/en/DOM/document.createEvent" title="https://developer.mozilla.org/En/DOM/Document.createEvent">createEvent</a>('Event');


Expected results:

The JS code snippet should have clickable links instead of showing HTML markup.

For example, the second line should read:
var evt = document.createEvent('Event');
With the "createEvent" part being a clickable link.
I can confirm this one.
The same problem occurs in the XML sample code on https://developer.mozilla.org/en-US/docs/Creating_OpenSearch_plugins_for_Firefox.
It looks like people were previously using <a> tags in code examples to link to the articles of certain keywords. In fact, Deki might have been doing this automatically.

We talked about automatically linking to keywords in our new code examples system, so for now I think the task should be to remove these <a> tags for now.

https://etherpad.mozilla.org/OeffTB7MpN

Sheppy, Jean-Yves: Can you take a look at this?
Component: Docs Platform → Documentation Requests
Summary: Code snippets show raw HTML markup instead of links → Remove raw HTML links from code examples
Yes, agreed; we should remove these. They actually should not have been there in the first place, as they weren't supposed to work in the past.
Version: MDN → unspecified
Component: Documentation Requests → Documentation
Once we have real sample management, good annotations may make this unnecessary. Are there valid use cases for having links in code samples?
Code samples shouldn't play any part in site navigation -- they should only illustrate how to use a given technology.  If a technology used in the code sample is worth linking to, it should be explained in text.
Component: Documentation → General
Product: Mozilla Developer Network → Developer Documentation
Whiteboard: u=mdn p=0
Whiteboard: u=mdn p=0 → u=mdn p=0 c=General
The page is looking find now.
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.