Closed Bug 1138173 Opened 11 years ago Closed 9 years ago

Escape tags in raw en-US version of an article while editing a local

Categories

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

All
Other
defect
Not set
minor

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: sphinx_knight, Unassigned)

Details

(Whiteboard: [specification][type:bug][mozfr-community])

Attachments

(2 files)

What did you do? ================ 1. Went on https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/fr to edit it   2. Switched the en-US side to raw source code using the "Display source" button What happened? ============== The source for en-US in translation mode contains: "<code><script type="application/javascript;version=1.7"></code>" (which breaks the localized page if copied/pasted on the other side) What should have happened? ========================== The source that is displayed in translation mode should be the same as the one displayed in "en-US" editing mode. e.g. here : on the en-US editing page, the source is : "<code>&lt;script type="application/javascript;version=1.7"&gt;</code>" (the entities around script are escaped properly" this should be the same on the en-US soure version in the translation interface Is there anything else we should know? ======================================
Status: UNCONFIRMED → NEW
Ever confirmed: true
:teoli, can you help make this clear? It's not obvious to me what needs to happen.
Severity: normal → minor
Flags: needinfo?(jypenator)
Hello Justin, what needs to happen is: escaping the entities in the raw version of the en-US which is used as a "model" vs. the localized article while in translation mode. Escaping is done correctly when: - editing the en-US article ("classic" edition mode) and viewing raw mode after the edit (e.g. typing "<script>" in the rich text editor) [a] - editing the localized version ("2 panels" edition mode) and viewing raw mode after the edit (e.g. typing "<script>" in the rich text editor) [b] However, when switching from "rendered view" to "raw" in the en-US panel when localizing, the raw code of the article that one get is not the same as the one we get in [a] (entities are not escaped). The "goal" of this is to have the exact same content when: - viewing the raw code of the article when editing the en-US version - viewing the raw code of the en-US version of the article in the localization editing interface
Yep, or on other words: The HTML of an English page that is: "<a href="...">&lt;script&gt;</a>" should be displayed in the en-US sidepanel of the l10n interface (when in source mode) as: "<a href="...">&lt;script&gt;</a>" and not as "<a href="..."><script></a>" as now.
Flags: needinfo?(jypenator)
I confirm the same happens with CSS : 'class: "hidden"' masks the content in the left panel of the translation mode. Use case: - migrating samples with HTML - translating tutoriel page about WebGL
Whiteboard: [specification][type:bug] → [specification][type:bug][mozfr-community]
Commit pushed to master at https://github.com/mozilla/kuma https://github.com/mozilla/kuma/commit/612ba5c2e3a9fa2e0a7175895a4a8fe30d672aeb Merge pull request #3928 from MatonAnthony/bug-1138173 Bug 1138173 : Escape tags in raw en-US version of an article while editing a local
Fix pushed to staging and production, verified on https://developer.mozilla.org/fr/docs/Web/JavaScript/Reference/Instructions/let (compatibility table notes).
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Thanks Anthony & John!!
Product: developer.mozilla.org → developer.mozilla.org Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: