Ticket #3224 (closed defect: fixed)

Opened 2 years ago

Last modified 2 years ago

wp-admin/upload-js.php uninternationalized

Reported by: nbachiyski Assigned to: markjaquith
Priority: low Milestone: 2.1
Component: Administration Version: 2.1
Severity: normal Keywords: has-patch 2nd-opinion
Cc:

Description

Internationalized of this file is missing. Patch attached.

Attachments

i18n-upload-js.diff (8.9 kB) - added by nbachiyski on 10/08/06 12:08:58.
3224.diff (3.7 kB) - added by mdawaffe on 12/05/06 22:20:21.
3224b.diff (0.8 kB) - added by mdawaffe on 12/05/06 22:39:01.
"someone" = "mdawaffe"

Change History

10/08/06 12:08:58 changed by nbachiyski

  • attachment i18n-upload-js.diff added.

10/08/06 20:43:21 changed by foolswisdom

  • keywords changed from bg|has-patch to has-patch.
  • version set to 2.1.
  • milestone set to 2.1.

10/12/06 10:20:37 changed by markjaquith

  • keywords changed from has-patch to has-patch 2nd-opinion.
  • owner changed from anonymous to markjaquith.
  • status changed from new to assigned.

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't wp_specialchars($string, true) be the way to go here?

11/19/06 01:23:49 changed by ryan

Also, let's include raquo in the gettext.

12/05/06 02:29:03 changed by ryan

Not sure whether wp_specialchars or js_escape is best here. Going with wp_specialchars for now.

12/05/06 02:29:47 changed by ryan

  • status changed from assigned to closed.
  • resolution set to fixed.

(In [4605]) upload-js gettext. Props nbachiyski. fixes #3224

12/05/06 22:19:54 changed by mdawaffe

  • status changed from closed to reopened.
  • resolution deleted.

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.

12/05/06 22:20:21 changed by mdawaffe

  • attachment 3224.diff added.

12/05/06 22:27:04 changed by ryan

  • status changed from reopened to closed.
  • resolution set to fixed.

(In [4611]) upload-js gettext fixes from mdawaffe. fixes #3224

12/05/06 22:36:43 changed by Nazgul

  • status changed from closed to reopened.
  • resolution deleted.

Someone killed a > too many in the second line af the last patch.

12/05/06 22:39:01 changed by mdawaffe

  • attachment 3224b.diff added.

"someone" = "mdawaffe"

12/05/06 22:41:57 changed by ryan

  • status changed from reopened to closed.
  • resolution set to fixed.

(In [4613]) Typo fix. fixes #3224