diff --git a/web/site/instances.php b/web/site/instances.php index d1afced..e79aa27 100644 --- a/web/site/instances.php +++ b/web/site/instances.php @@ -965,21 +965,23 @@ function nullyp($str) { function strip($str,$uri) { if (nullemp($str)) return(null); - $str=preg_replace('#]*)?>.*#is','',$str);// strip all inline css styles definitions - $str=preg_replace('#" to "
" + $str=preg_replace('#]*>
#i','',$str); + $str=preg_replace('#]*href="(?![a-zA-Z]+://)([^"]+)#i','','

'],$str); - $str=preg_replace(['#


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

    #i'],['

    ','','
','
    '],$str); + //$str=preg_replace(['#


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

#i','#

    #i'],['

    ','','
','
$#i', '#]*>(.*)$#i'],['

$1

', '
    $1
', '
    $1
', '
$1
'],$str); + $str=preg_replace('#]*>\s*

#is','',$str); + $str=preg_replace(['#]*>(.*)

#i','#]>(.*)#i'],['

$1

','

$1

'],$str); + $str=strip_tags($str,'

    • '); + $str=preg_replace('#<([^>]*)\s(style|class)="[^"]*"([^>]*)>#i','<$1$3>',$str); + $str=preg_replace(['#]*>#i','##i'],['

      ','

      '],$str); + $str=preg_replace(['#<([ou])l[^>]*>#i','##i'],['

      <$1l class="nobott">','

      '],$str); + $str=preg_replace(['#
      \s+
      #i','#^(
      )+#i','#(
      ){3,}#i','#(
      )+$#i','#\s*(
      )+#i','#
    • \s*(
      )+#i'],['

      ','','

      ','','
      ','
      '],$str); + // this part below is to try and assign the css "nobott" css class to a possible closing
        /
          , to avoid the useless and UGLY last bottom-margin :-) + $str=preg_replace(['#]*>(.*)
      $#i','#]*>(.*)
    $#i'],['
      $1
    ','
      $1
    '],$str); return $str; }