be more forgiving about the order of link parameters in html->bb

This commit is contained in:
Friendika 2011-02-02 18:09:27 -08:00
parent 1a18f4bcde
commit 25c2640c17

View file

@ -23,7 +23,7 @@ function html2bbcode($s) {
'/\<div(.*?)\>(.*?)\<\/div\>/is', '/\<div(.*?)\>(.*?)\<\/div\>/is',
'/\<br(.*?)\>/is', '/\<br(.*?)\>/is',
'/\<strong\>(.*?)\<\/strong\>/is', '/\<strong\>(.*?)\<\/strong\>/is',
'/\<a href=\"(.*?)\"(.*?)\>(.*?)\<\/a\>/is', '/\<a (.*?)href=\"(.*?)\"(.*?)\>(.*?)\<\/a\>/is',
'/\<code\>(.*?)\<\/code\>/is', '/\<code\>(.*?)\<\/code\>/is',
'/\<span style=\"color:(.*?)\"\>(.*?)\<\/span\>/is', '/\<span style=\"color:(.*?)\"\>(.*?)\<\/span\>/is',
'/\<blockquote\>(.*?)\<\/blockquote\>/is', '/\<blockquote\>(.*?)\<\/blockquote\>/is',
@ -48,7 +48,7 @@ function html2bbcode($s) {
'$2', '$2',
"\n", "\n",
'[b]$1[/b]', '[b]$1[/b]',
'[url=$1]$3[/url]', '[url=$2]$4[/url]',
'[code]$1[/code]', '[code]$1[/code]',
'[color="$1"]$2[/color]', '[color="$1"]$2[/color]',
'[quote]$1[/quote]', '[quote]$1[/quote]',