Make WordPress Core

Opened 16 years ago

Closed 16 years ago

Last modified 15 years ago

#2892 closed defect (bug) (fixed)

JS confirmation dialog for deletion in 'manage posts'

Reported by: c0ldfusi0nz's profile c0ldfusi0nz Owned by:
Milestone: Priority: normal
Severity: normal Version: 2.0.3
Component: Administration Keywords:
Focuses: Cc:

Description

Line #213 in wp-admin/edit.php

The javascript confirmation dialog fails to appear when trying to delete a post under 'manage posts' if the title of the post contains any single quotes. Thus the post is deleted without confirmation.

I see that wp_specialchars is encoding single quotes in the title as ' but the JS is converting that back to a single quote which ends the message string early and results in the popup dialog's failure to appear. I would recommend adding some logic to js_escape to make sure any single quotes are getting escaped, such as a str_replace to add a backslash in front of the ' chars.

Change History (3)

#1 @ryan
16 years ago

[3906] converts the 039s to a quote and then backslashes. See #2851.

#2 @ryan
16 years ago

  • Milestone set to 2.0.4
  • Resolution set to fixed
  • Status changed from new to closed
  • Version set to 2.0.3

#3 @(none)
15 years ago

  • Milestone 2.0.4 deleted

Milestone 2.0.4 deleted

Note: See TracTickets for help on using tickets.