8 function html2bbcode($s) {
14 '/\<pre\>(.*?)\<\/pre\>/is',
17 '/\<b\>(.*?)\<\/b\>/is',
18 '/\<i\>(.*?)\<\/i\>/is',
19 '/\<u\>(.*?)\<\/u\>/is',
20 '/\<ul\>(.*?)\<\/ul\>/is',
21 '/\<li\>(.*?)\<\/li\>/is',
22 '/\<img(.*?) src=\"(.*?)\" (.*?)\>/is',
23 '/\<div(.*?)\>(.*?)\<\/div\>/is',
25 '/\<strong\>(.*?)\<\/strong\>/is',
26 '/\<a href=\"(.*?)\"(.*?)\>(.*?)\<\/a\>/is',
27 '/\<code\>(.*?)\<\/code\>/is',
28 '/\<span style=\"color:(.*?)\"\>(.*?)\<\/span\>/is',
29 '/\<blockquote\>(.*?)\<\/blockquote\>/is',
30 '/\<video(.*?) src=\"(.*?)\" (.*?)\>(.*?)\<\/video\>/is',
31 '/\<audio(.*?) src=\"(.*?)\" (.*?)\>(.*?)\<\/audio\>/is',
53 '[color="$1"]$2[/color]',
59 // Replace $htmltags in $text with $bbtags
60 $text = preg_replace ($htmltags, $bbtags, $s);
62 call_hooks('html2bbcode', $text);
64 // Strip all other HTML tags
65 $text = strip_tags($text);