#3224 closed defect (bug) (fixed)
wp-admin/upload-js.php uninternationalized
| Reported by: | nbachiyski | Owned by: | markjaquith |
|---|---|---|---|
| Priority: | low | Milestone: | 2.1 |
| Component: | Administration | Version: | 2.1 |
| Severity: | normal | Keywords: | has-patch 2nd-opinion |
| Cc: | Focuses: |
Description
Internationalized of this file is missing.
Patch attached.
Attachments (3)
Change History (12)
#4
@
20 years ago
Not sure whether wp_specialchars or js_escape is best here. Going with wp_specialchars for now.
#6
@
20 years ago
- Resolution fixed
- Status closed → reopened
markaquith, it's more annoying than that. Sometiems JS interprets " as a real quote mark. It get's a little confusing.
js_escape() was born out of compromise, but it is asymmetric in single v. double quotes, so you still need to be careful. You definitely need to use js_escape() when there's a chance of \n appearing in the string.
Attached fixes some problems.
Note:
See TracTickets
for help on using tickets.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Is
addslashes()the right thing to be using? Seems to me that single quotes need to be HTML entitized for HTML validation, and double quotes need to be HTML entitized for JS validation. Wouldn'twp_specialchars($string, true)be the way to go here?