From e71729de5c027e18bdf9d55b267e49bacfeec080 Mon Sep 17 00:00:00 2001 From: real_nowhereman Date: Thu, 31 Jan 2008 09:14:15 +0000 Subject: [PATCH] Fixed problem with [code] tag and inline html: please notice that it is now assumed that with inline html you're not using [html] tag, so DON'T because it will unescape the code twice which is BAD ;) --- fp-plugins/bbcode/plugin.bbcode.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/fp-plugins/bbcode/plugin.bbcode.php b/fp-plugins/bbcode/plugin.bbcode.php index 64f3856..b1b0416 100644 --- a/fp-plugins/bbcode/plugin.bbcode.php +++ b/fp-plugins/bbcode/plugin.bbcode.php @@ -8,7 +8,7 @@ Author: Hydra, NoWhereMan Author URI: http://flatpress.sf.net */ -define('BBCODE_ESCAPE_HTML', true); +define('BBCODE_ESCAPE_HTML', 0); define('BBCODE_ENABLE_COMMENTS', false); define('BBCODE_USE_EDITOR', true); define('BBCODE_URL_MAXLEN', 40); @@ -340,6 +340,10 @@ function do_bbcode_code ($action, $attributes, $content, $params, $node_object) $temp_str = str_replace( chr(10).chr(10), chr(10), $temp_str ); $temp_str = str_replace( chr(32), ' ', $temp_str ); + if (!BBCODE_ESCAPE_HTML) { + $temp_str = wp_specialchars($temp_str); + } + $a = ''; if (function_exists('plugin_syntaxhighlighter_foot')) {