Closed Bug 508735 Opened 15 years ago Closed 15 years ago

An error message on the file upload interface is garbled

Categories

(addons.mozilla.org Graveyard :: Developer Pages, defect)

defect
Not set
normal

Tracking

(Not tracked)

VERIFIED DUPLICATE of bug 504930

People

(Reporter: kohei, Unassigned)

Details

Attachments

(3 files, 1 obsolete file)

An add-on author reported that he encountered a garbled error message when uploading a new file. I confirmed the issue -- the message could be found at

https://addons.mozilla.org/ja/developers/versions/addfile/<VersionID>
https://addons.mozilla.org/ja/developers/versions/add/<AddonID>

It's between "Oops! There seems to be a problem with this file..." and "Please correct this problem and upload your file again." and is loaded via JSON.

Screenshots and patch will follow.
This is msgid "devcp_error_updateurl"

"addons.mozilla.org 以外の updateURL を指定することはできません。install.rdf"
"ファイルから updateURL を削除した上で、再度アップロードしてください。"
This is msgid "devcp_update_addon_version_exists_error"

"アップロードされたバージョン (%1$s) は既に存在します。このバージョンに他の"
"ファイルを追加するには、<a href=\"%2$s\">ここをクリック</a> してください。"
Attached patch patch (obsolete) — Splinter Review
The problem is caused by custom urldecode function in developer.js. Just use built-in decodeURI() instead.
Attached patch patch v2Splinter Review
Nope, the cause is unescape().
Attachment #392876 - Attachment is obsolete: true
Attachment #392877 - Attachment is patch: true
Attachment #392877 - Attachment mime type: application/octet-stream → text/plain
The messages above are Japanese but this problem may reproduce in other non-ascii languages.
Attachment #392877 - Flags: review?(fwenzel)
Target Milestone: --- → 5.0.9
Comment on attachment 392877 [details] [diff] [review]
patch v2

Kohei, thank you for figuring out this problem. I was working on the very same problem in bug 504930. The solution, in my opinion, is not fixing the URI decoding, but using proper JSON escaping in the first place. I have a patch ready for this. Sorry for not accepting your patch because of this.
Attachment #392877 - Flags: review?(fwenzel) → review-
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → DUPLICATE
Status: RESOLVED → VERIFIED
Product: addons.mozilla.org → addons.mozilla.org Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: