"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "Upload/inc/class_parser.php" between
mybb_1822.zip and mybb_1823.zip

About: MyBB is a multilingual, standards-compliant and free forum (discussion board) software.

class_parser.php  (mybb_1822):class_parser.php  (mybb_1823)
skipping to change at line 1811 skipping to change at line 1811
$message = preg_replace_callback("#\[php\](.*?)\[/php\](\r\n?|\n? )#is", array($this, 'mycode_parse_php_callback'), $message); $message = preg_replace_callback("#\[php\](.*?)\[/php\](\r\n?|\n? )#is", array($this, 'mycode_parse_php_callback'), $message);
$message = preg_replace_callback("#\[code\](.*?)\[/code\](\r\n?|\ n?)#is", array($this, 'mycode_parse_code_callback'), $message); $message = preg_replace_callback("#\[code\](.*?)\[/code\](\r\n?|\ n?)#is", array($this, 'mycode_parse_code_callback'), $message);
$find = array( $find = array(
"#\[(b|u|i|s|url|email|color|img)\](.*?)\[/\\1\]#is", "#\[(b|u|i|s|url|email|color|img)\](.*?)\[/\\1\]#is",
"#\[(email|color|size|font|align|video)=[^]]*\](.*?)\[/\\ 1\]#is", "#\[(email|color|size|font|align|video)=[^]]*\](.*?)\[/\\ 1\]#is",
"#\[img=([1-9][0-9]*)x([1-9][0-9]*)\](\r\n?|\n?)(https?:/ /([^<>\"']+?))\[/img\]#is", "#\[img=([1-9][0-9]*)x([1-9][0-9]*)\](\r\n?|\n?)(https?:/ /([^<>\"']+?))\[/img\]#is",
"#\[url=((?!javascript)[a-z]+?://)([^\r\n\"<]+?)\](.+?)\[ /url\]#si", "#\[url=((?!javascript)[a-z]+?://)([^\r\n\"<]+?)\](.+?)\[ /url\]#si",
"#\[url=((?!javascript:)[^\r\n\"<&\(\)]+?)\](.+?)\[/url\] #si", "#\[url=((?!javascript:)[^\r\n\"<&\(\)]+?)\](.+?)\[/url\] #si",
"#\[attachment=([0-9]+?)\]#i",
); );
$replace = array( $replace = array(
"$2", "$2",
"$2", "$2",
"$4", "$4",
"$3 ($1$2)", "$3 ($1$2)",
"$2 ($1)", "$2 ($1)",
"",
); );
$messageBefore = ""; $messageBefore = "";
// The counter limit for this "for" loop is for defensive program ming purpose only. It protects against infinite repetition. // The counter limit for this "for" loop is for defensive program ming purpose only. It protects against infinite repetition.
for($cnt = 1; $cnt < 20 && $message != $messageBefore; $cnt++) for($cnt = 1; $cnt < 20 && $message != $messageBefore; $cnt++)
{ {
$messageBefore = $message; $messageBefore = $message;
$message = preg_replace($find, $replace, $messageBefore); $message = preg_replace($find, $replace, $messageBefore);
} }
 End of changes. 2 change blocks. 
0 lines changed or deleted 2 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)