From 3aca654d83073ca2e4ce887026d720c1c09aa7f8 Mon Sep 17 00:00:00 2001 From: pezcurrel Date: Sun, 25 Aug 2024 19:05:58 +0200 Subject: [PATCH] Made the regex to strip paragraphs and divs ungreedy --- web/site/instances.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/web/site/instances.php b/web/site/instances.php index e79aa27..34ced06 100644 --- a/web/site/instances.php +++ b/web/site/instances.php @@ -965,7 +965,7 @@ function nullyp($str) { function strip($str,$uri) { if (nullemp($str)) return(null); - //echo '
'.$str.'
'; + echo '
'.htmlentities($str).'
'; $str=preg_replace(['#^\s*#m','#[\r\n]#'],['',' '],$str);// strip all spaces from empty lines, then all carriage return and new line chars $str=preg_replace('##i','
',$str);// convert all "
" to "
" $str=preg_replace('#]*>#i','',$str); @@ -974,7 +974,7 @@ function strip($str,$uri) { //$str=preg_replace(['#


#i','#
#i','#
#i','#

    #i'],['

    ','','
','