Author: Juppertje » Wed Jul 12, 2006 1:38 pm
sorry i do not understand what you mean are we talking about the same file includes/functions_post.php ?
My file is much longer then the part you show me above here <img>
do you mean this part to replace with your part?
[code]function prepare_message($message, $html_on, $bbcode_on, $smile_on, $bbcode_uid = 0){ global $board_config, $html_entities_match, $html_entities_replace; // // Clean up the message // $message = trim($message); if ($html_on) { $allowed_html_tags = split(',', $board_config['allow_html_tags']); $end_html = 0; $start_html = 1; $tmp_message = ''; $message = ' ' . $message . ' '; while ($start_html = strpos($message, '<', $start_html)) { $tmp_message .= preg_replace($html_entities_match, $html_entities_replace, substr($message, $end_html + 1, ($start_html - $end_html - 1))); if ($end_html = strpos($message, '>', $start_html)) { $length = $end_html - $start_html + 1; $hold_string = substr($message, $start_html, $length); if (($unclosed_open = strrpos(' ' . $hold_string, '<')) != 1) { $tmp_message .= preg_replace($html_entities_match, $html_entities_replace, substr($hold_string, 0, $unclosed_open - 1)); $hold_string = substr($hold_string, $unclosed_open - 1); } $tagallowed = false; for ($i = 0; $i < sizeof($allowed_html_tags); $i++) { $match_tag = trim($allowed_html_tags[$i]); if (preg_match('#^</?' . $match_tag . '[> ]#i', $hold_string)) { $tagallowed = (preg_match('#^</?' . $match_tag . ' .*?(style[ ]*?=|on[w]+[ ]*?=)#i', $hold_string)) ? false ]
Last edited by
Juppertje on Wed Dec 31, 1969 4:00 pm, edited 1 time in total.