diff options
Diffstat (limited to 'include/text.php')
-rw-r--r-- | include/text.php | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/include/text.php b/include/text.php index 2693e7b16..6ab8fc1ce 100644 --- a/include/text.php +++ b/include/text.php @@ -887,6 +887,8 @@ function get_tags($s) { // ignore anything in a code or svg block $s = preg_replace('/\[code(.*?)\](.*?)\[\/code\]/sm','',$s); + $s = preg_replace('/\[nobb\](.*?)\[\/nobb\]/sm','',$s); + $s = preg_replace('/\[noparse\](.*?)\[\/noparse\]/sm','',$s); $s = preg_replace('/\[svg(.*?)\](.*?)\[\/svg\]/sm','',$s); $s = preg_replace('/\[toc(.*?)\]/sm','',$s); @@ -2529,26 +2531,26 @@ function check_webbie($arr) { return ''; } -function ids_to_array($arr,$idx = 'id') { - $t = array(); +function ids_to_array($arr, $idx = 'id') { + $t = []; if($arr) { foreach($arr as $x) { - if(array_key_exists($idx,$x) && strlen($x[$idx]) && (! in_array($x[$idx],$t))) { + if(array_key_exists($idx, $x) && strlen($x[$idx]) && (! in_array($x[$idx], $t))) { $t[] = $x[$idx]; } } } - return($t); + return $t; } -function ids_to_querystr($arr,$idx = 'id',$quote = false) { - $t = array(); +function ids_to_querystr($arr, $idx = 'id', $quote = false) { + $t = []; if($arr) { foreach($arr as $x) { - if(! in_array($x[$idx],$t)) { + if(!in_array($x[$idx], $t)) { if($quote) $t[] = "'" . dbesc($x[$idx]) . "'"; else @@ -2556,7 +2558,7 @@ function ids_to_querystr($arr,$idx = 'id',$quote = false) { } } } - return(implode(',', $t)); + return implode(',', $t); } /** @@ -2699,8 +2701,8 @@ function stringify_array_elms(&$arr, $escape = false) { */ function stringify_array($arr, $escape = false) { if($arr) { - stringify_array_elms($arr); - return(implode(',',$arr)); + stringify_array_elms($arr, $escape); + return(implode(',', $arr)); } return EMPTY_STR; } |