#3224 closed defect (bug) (fixed)
wp-admin/upload-js.php uninternationalized
Reported by: | nbachiyski | Owned by: | markjaquith |
---|---|---|---|
Milestone: | 2.1 | Priority: | low |
Severity: | normal | Version: | 2.1 |
Component: | Administration | Keywords: | has-patch 2nd-opinion |
Focuses: | Cc: |
Description
Internationalized of this file is missing.
Patch attached.
Attachments (3)
Change History (12)
#1
@
18 years ago
- Keywords has-patch added; bg|has-patch removed
- Milestone set to 2.1
- Version set to 2.1
#2
@
18 years ago
- Keywords 2nd-opinion added
- Owner changed from anonymous to markjaquith
- Status changed from new to assigned
#4
@
18 years ago
Not sure whether wp_specialchars or js_escape is best here. Going with wp_specialchars for now.
#6
@
18 years ago
- Resolution fixed deleted
- Status changed from closed to 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.
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?