diff --git a/inc/classes/parse.class.php b/inc/classes/parse.class.php index 8351c9b..b5bd630 100644 --- a/inc/classes/parse.class.php +++ b/inc/classes/parse.class.php @@ -29,7 +29,7 @@ class Parse { function MakeClickable($txt) { /* Make http:// urls in posts clickable */ - $txt = preg_replace('#(http://|https://|ftp://)([^(\s<)]*)#', '\\1\\2', $txt); + $txt = preg_replace('#(http://|https://|ftp://)([^(\s<|\[)]*)#', '\\1\\2', $txt); return $txt; } diff --git a/inc/func/stringformatting.php b/inc/func/stringformatting.php index e5c7e17..0fc02f4 100644 --- a/inc/func/stringformatting.php +++ b/inc/func/stringformatting.php @@ -199,7 +199,12 @@ function formatLongMessage($message, $board, $threadid, $page) { $message_shortened = substr($message_shortened, 0, KU_LINELENGTH); } $message_shortened = closeOpenTags($message_shortened); - + + if (strrpos($message_shortened,"<") > strrpos($message_shortened,">")) { + //We have a partially opened tag we need to get rid of. + $message_shortened = substr($message_shortened, 0, strrpos($message_shortened,"<")); + } + $output = $message_shortened . '