diff --git a/functions.php b/functions.php index 458314d..39b4d9a 100644 --- a/functions.php +++ b/functions.php @@ -206,8 +206,13 @@ function parse_code($string) { function unbbcode($string) { global $settings; $string = preg_replace("#\[b\](.+?)\[/b\]#is", "*\\1*", $string); - $string = preg_replace("#\[i\](.+?)\[/i\]#is", "\\1", $string); - $string = preg_replace("#\[u\](.+?)\[/u\]#is", "\\1", $string); + $string = preg_replace("#\[i\](.+?)\[/i\]#is", "/\\1/", $string); + $string = preg_replace("#\[u\](.+?)\[/u\]#is", "_\\1_", $string); + $string = preg_replace("#\[s\](.+?)\[/s\]#is", "\\1", $string); + $string = preg_replace("#\[d\](.+?)\[/d\]#is", "\\1", $string); + $string = preg_replace("#\[sup\](.+?)\[/sup\]#is", "^\\1", $string); + $string = preg_replace("#\[sub\](.+?)\[/sub\]#is", "\\1", $string); + $string = preg_replace("#\[inlinecode\](.+?)\[/inlinecode\]#is", "\\1", $string); $string = preg_replace("#\[link\]www\.(.+?)\[/link\]#is", "http://www.\\1", $string); $string = preg_replace("#\[link\](.+?)\[/link\]#is", "\\1", $string); $string = preg_replace("#\[link=(.+?)\](.+?)\[/link\]#is", "\\2 --> \\1", $string);