I’m completely new to WordPress so it may be that the following doesn’t follow guidelines or has undesirable side effects.
There are 2 places the backslash is eaten – in the editing and in the presentation of the blog. So stripslashes
needs to be removed in 2 areas
1. Editing:
includes/functions-formatting.php
Line 233
After
function format_to_edit($content) {
$content = stripslashes($content);
$content = apply_filters('format_to_edit', $content);
$content = htmlspecialchars($content);
return $content;
}
Add
function format_to_edit2($content) {
$content = apply_filters('format_to_edit', $content);
$content = htmlspecialchars($content);
return $content;
}
wp-admin/post.php
Line 222
After
$content = $postdata->post_content;
Change $content = format_to_edit($content);
to
$content = format_to_edit2($content);
2. Presentation:
wp_includes/functions.php
Line 1081
Change
$content = stripslashes($post->post_content);
to
$content = $post->post_content;
Line 1089
Change
$pages[0] = stripslashes($post->post_content);
to
$pages[0] = $post->post_content;
Hmmm, I guess “stripslashes” is not here just to piss everybody eating their backslash, so what are the side effects if removing it ?
In the CVS includes/functions-formatting.php and includes/functions.php have been changed to remove the stripslashes (no need to alter post.php as format_to_edit function has been altered), so no more backslash eating!
Anonymous
thanx to stevem – it looks works for me
Anonymous
Nice work. I commented out the lines you were talking about and added the changes. Backslashes are back baby.
One small note: in functions-formatting.php
the block of code you were talking about appeared on line 226, not 233. Also, instead of creating an entirely new function, you can simply comment out the appropriate line and be done with it.
Stevem, please do not recomand people to get files from the CVS. It will ruind their current version of WP. At least it fucked up my WP blog (1.2.2), really bad, I have to get back the files from the original pack.
I would like the devs to give a little more attention to the way data is handeled. There is no point in having 4 types of RSS, pingomatic and permalinks (all kind of useless tech) if simple posting of messages is cripled by mallfunctioning filtering funtions.