Make WordPress Core

Opened 18 years ago

Closed 18 years ago

Last modified 7 months 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
18 years ago

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

#2 @ryan
18 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)
18 years ago

  • Milestone 2.0.4 deleted

Milestone 2.0.4 deleted

Note: See TracTickets for help on using tickets.