Make WordPress Core

Opened 22 years ago

Closed 21 years ago

Last modified 17 years ago

#1053 closed defect (bug) (fixed)

Slashes added to double-quotes in < pre > found in post content

Reported by: dsandler Owned by:
Priority: normal Milestone:
Component: General Version: 1.5
Severity: minor Keywords:
Cc: Focuses:

Description

Example post body (as entered in the admin pages, and verified by dumping the table in mysql):

<pre>'Singles' "Doubles"</pre>

As rendered on page (either in edit preview or on site itself):

<pre>'Singles' \"Doubles\"</pre>

Adding a call to stripslashes() to something like clean_pre() is the Wrong Thing To Do because it'll kill backslashes the user intended to be there.

A quick fix seems to involve adding a specific regexp for this case to clean_pre():

52a53

$text = str_replace('
"', '"', $text);

This seems to work for me, but I'm sure a more subtle fix is required to handle all cases.

Change History (5)

#1 @dsandler
22 years ago

  • PatchNo

#2 @dsandler
22 years ago

Eww---I didn't expect Mantis to emit the HTML un-escaped in bug lists and whatnot. Someone with Super Cool Privileges will probably have to clean up the bug report. Sorry!

#3 @coffee2code
22 years ago

  • Summary Slashes added to double-quotes in <pre> found in post contentSlashes added to double-quotes in &lt;pre> found in post content

#4 @coffee2code
22 years ago

  • Summary Slashes added to double-quotes in &lt;pre> found in post contentSlashes added to double-quotes in < pre > found in post content

#5 @markjaquith
21 years ago

  • Resolutionfixed
  • Status newclosed

Fixed in [3049]

Note: See TracTickets for help on using tickets.