@@ -502,24 +502,26 @@ protected function clean(string $str): string
502502 $ str = mb_eregi_replace ("<!\[CDATA\[(.*?)\]\]> " , '' , $ str );
503503
504504 // strip out <script> tags
505- if ($ this ->options ->get ('removeScripts ' ) == true ) {
505+ if ($ this ->options ->get ('removeScripts ' )) {
506506 $ str = mb_eregi_replace ("<\s*script[^>]*[^/]>(.*?)<\s*/\s*script\s*> " , '' , $ str );
507507 $ str = mb_eregi_replace ("<\s*script\s*>(.*?)<\s*/\s*script\s*> " , '' , $ str );
508508 }
509509
510510 // strip out <style> tags
511- if ($ this ->options ->get ('removeStyles ' ) == true ) {
511+ if ($ this ->options ->get ('removeStyles ' )) {
512512 $ str = mb_eregi_replace ("<\s*style[^>]*[^/]>(.*?)<\s*/\s*style\s*> " , '' , $ str );
513513 $ str = mb_eregi_replace ("<\s*style\s*>(.*?)<\s*/\s*style\s*> " , '' , $ str );
514514 }
515515
516516 // strip out server side scripts
517- if ($ this ->options ->get ('serverSideScriptis ' ) == true ) {
517+ if ($ this ->options ->get ('serverSideScripts ' )) {
518518 $ str = mb_eregi_replace ("(<\?)(.*?)(\?>) " , '' , $ str );
519519 }
520520
521521 // strip smarty scripts
522- $ str = mb_eregi_replace ("(\{\w)(.*?)(\}) " , '' , $ str );
522+ if ($ this ->options ->get ('removeSmartyScripts ' )) {
523+ $ str = mb_eregi_replace ("(\{\w)(.*?)(\}) " , '' , $ str );
524+ }
523525
524526 return $ str ;
525527 }
0 commit comments