Edit post bugfix for b2 GeSHi syntax highlighter hack
You will find that if you edit a post after making it, any backslashes you have in your code will get stripped. To fix this behavior, modify the "editpost" branch of the switch statement in b2edit.php. Comment out the call to the balanceTags() method and add a call to addSlashes() as shown below.
PHP:
case "editpost": $standalone = 1; require_once("./b2header.php"); if ($user_level == 0 || $user_level == 1) $blog_ID = 1; } $post_ID = $HTTP_POST_VARS["post_ID"]; // Removed as part of the GeSHi Syntax Highlighter hack //$content = balanceTags($HTTP_POST_VARS["content"]); $content = format_to_post($content); // Add slashes, part of the GeSHi Syntax Highlighter hack
Note: Since the GeSHi hack currently removes the call to balanceTags(), you need to take care to make sure that you close any and all HTML tags you include in your post and to escape characters such as the less-than sign (<). Otherwise the display of your site and/or your XML feed may break (had it happen to me yesterday!)
By the way, try clicking on some of the keywords (like isset or addslashes) in the code listing above... cool, isn't it? GeSHi rocks! :)