fix corrupting urls with multiple params

This commit is contained in:
mappu 2014-07-03 22:31:13 +12:00
parent 6801e99164
commit dc260a27d6

View File

@ -100,7 +100,7 @@ function text2html($sz) {
$sectionFmt = function($sz) { $sectionFmt = function($sz) {
$base = hesc($sz); $base = hesc($sz);
$base = preg_replace('~=+(.+)=+~', '<strong>\\1</strong>', $base); $base = preg_replace('~^=+(.+)=+~m', '<strong>\\1</strong>', $base);
$base = preg_replace('~(https?://[^ \\r\\n\\t]+)~i', '<a href="\\1">\\1</a>', $base); $base = preg_replace('~(https?://[^ \\r\\n\\t]+)~i', '<a href="\\1">\\1</a>', $base);
$btparts = explode('`', $base); $btparts = explode('`', $base);