diff options
Diffstat (limited to 'phpBB/includes')
| -rw-r--r-- | phpBB/includes/functions_posting.php | 2 | ||||
| -rw-r--r-- | phpBB/includes/message_parser.php | 11 |
2 files changed, 10 insertions, 3 deletions
diff --git a/phpBB/includes/functions_posting.php b/phpBB/includes/functions_posting.php index 9480c153c1..0dd91d4f78 100644 --- a/phpBB/includes/functions_posting.php +++ b/phpBB/includes/functions_posting.php @@ -783,7 +783,7 @@ function submit_post($mode, $message, $subject, $username, $topic_type, $bbcode_ { $post_sql = array_merge($post_sql, array( 'post_checksum' => $post_data['message_md5'], - 'post_text' => stripslashes($message), + 'post_text' => $message, 'post_encoding' => $user->lang['ENCODING'] )); } diff --git a/phpBB/includes/message_parser.php b/phpBB/includes/message_parser.php index 409531305c..568fef2265 100644 --- a/phpBB/includes/message_parser.php +++ b/phpBB/includes/message_parser.php @@ -155,8 +155,10 @@ class parse_message function bbcode_init() { // Always parse [code] first + // [quote] moved to the second position $this->bbcode_array = array( 8 => array('#\[code\](.+\[/code\])#ise' => '$this->bbcode_code("\1")'), + 0 => array('#\[quote(=".*?")?\](.+?)\[/quote\]#ise' => '"[quote:$this->bbcode_uid" . $this->bbcode_quote("\1") . "]\2[/quote:$this->bbcode_uid]"'), 10 => array('#\[email(=.*?)?\](.*?)\[/email\]#ise' => '$this->validate_email("\1", "\2")'), 9 => array('#\[list(=[a-z|0-1]+)?\].*\[/list\]#ise' => '$this->bbcode_list("\0")'), 7 => array('#\[u\](.*?)\[/u\]#is' => '[u:' . $this->bbcode_uid . ']\1[/u:' . $this->bbcode_uid . ']'), @@ -168,8 +170,7 @@ class parse_message => '[img:' . $this->bbcode_uid . ']\1\2[/img:' . $this->bbcode_uid . ']'), 3 => array('#\[url=?(.*?)?\](.*?)\[/url\]#ise' => '$this->validate_url("\1", "\2")'), 2 => array('#\[i\](.*?)\[/i\]#is' => '[i:' . $this->bbcode_uid . ']\1[/i:' . $this->bbcode_uid . ']'), - 1 => array('#\[b\](.*?)\[/b\]#is' => '[b:' . $this->bbcode_uid . ']\1[/b:' . $this->bbcode_uid . ']'), - 0 => array('#\[quote(=".*?")?\](.*?)\[/quote\]#is' => '[quote:' . $this->bbcode_uid . '\1]\2[/quote:' . $this->bbcode_uid . ']') + 1 => array('#\[b\](.*?)\[/b\]#is' => '[b:' . $this->bbcode_uid . ']\1[/b:' . $this->bbcode_uid . ']') ); /************** @@ -183,6 +184,12 @@ class parse_message } + function bbcode_quote($username) + { + // Will do some stuff at some point (will hopefully prevent from breaking out quotes) + return $username; + } + function bbcode_code($in) { $str_from = array('<', '>', '"', ':', '[', ']', '(', ')', '{', '}', '.', '@'); |
