#2892 closed defect (bug) (fixed)
JS confirmation dialog for deletion in 'manage posts'
Reported by: |
|
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)
Note: See
TracTickets for help on using
tickets.
[3906] converts the 039s to a quote and then backslashes. See #2851.