Closed
Bug 1284781
Opened 9 years ago
Closed 9 years ago
Samples opened in JSFiddle will fail if CSS includes HTML escapes like
Categories
(developer.mozilla.org Graveyard :: General, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: chenpighead, Unassigned)
References
Details
(Keywords: in-triage, Whiteboard: [specification][type:bug])
What did you do?
================
1. visit https://developer.mozilla.org/en-US/docs/Web/CSS/clear
2. click [OPEN IN JSFIDDLE]/[OPEN IN CODEPEN] button below https://developer.mozilla.org/en-US/docs/Web/CSS/clear#CSS_Content
What happened?
==============
CSS style in jsfiddle/codepen does not work
What should have happened?
==========================
CSS style in jsfiddle/codepen should take effect
Is there anything else we should know?
======================================
If you manually copy texts in css content from MDN and copy it to jsfiddle/codepen, it works. Not sure if this is something about text encoding problem.
This may mislead users to think the examples on MDN are wrong/not working.
| Reporter | ||
Comment 1•9 years ago
|
||
Try copy css content from jsfiddle's css textarea after clicking [OPEN IN JSFIDDLE] and paste it to a text file. Open that text file w/ editors like vim, few strange characters appear in each line of style settings.
Comment 2•9 years ago
|
||
The CSS contained characters, which get removed when you click the "Tidy" button in JSFiddle. I removed them, and after waiting for the caches to clear, the JSFiddle works on load. We should replace these with spaces when we extract the CSS.
Comment 3•9 years ago
|
||
Rather than opening a new bug, I'm adjusting the title to focus on the root cause. The code sample extractor [1] will need an additional code to handle this case, where there was a previous fix for bug 819999.
Summary: clicking OPEN IN JSFIDDLE/CODEPEN button may copy wrong contents to jsfiddle/codepen → Samples opened in JSFiddle will fail if CSS includes HTML escapes like
Comment 4•9 years ago
|
||
Could it be browser related ? I can't seem to reproduce neither on Nightly or in Google Chrome.
Comment 5•9 years ago
|
||
(In reply to Anthony from comment #4)
> Could it be browser related ? I can't seem to reproduce neither on Nightly
> or in Google Chrome.
Nevermind, I'm being stupid.
Comment 7•9 years ago
|
||
I was wrong, it is not the code sample extractor. The JSFiddle / Codepen code loads the content from the webpage, and it is wiki-samples.js [1] that needs the fix.
[1] https://github.com/mozilla/kuma/blob/master/kuma/static/js/wiki-samples.js#L57-L72
Comment 8•9 years ago
|
||
Commits pushed to master at https://github.com/mozilla/kuma
https://github.com/mozilla/kuma/commit/58dd9b028a9cb98434050fbb1bc42bb2db2c953a
Fix bug 1284781
https://github.com/mozilla/kuma/commit/5b755d825fcb31aed26d80b36bc7bf487e94c840
Merge pull request #3904 from MatonAnthony/bug-1284781
Fix bug 1284781 Samples opened in JSFiddle will fail if CSS includes HTML escapes like
Updated•9 years ago
|
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Updated•5 years ago
|
Product: developer.mozilla.org → developer.mozilla.org Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•