$html=qa_sanitize_html($content,@$options['linksnewwindow'],false);// sanitize again for display, for extra safety, and due to new window setting
if(isset($options['blockwordspreg'])){// filtering out blocked words inline within HTML is pretty complex, e.g. p<b>oo</b>p must be caught
require_onceQA_INCLUDE_DIR.'qa-util-string.php';
require_onceQA_INCLUDE_DIR.'util/string.php';
$html=preg_replace('/<\s*('.$this->htmllineseparators.')[^A-Za-z0-9]/i',"\n\\0",$html);// tags to single new line
$html=preg_replace('/<\s*('.$this->htmlparagraphseparators.')[^A-Za-z0-9]/i',"\n\n\\0",$html);// tags to double new line
...
...
@@ -90,7 +90,7 @@ class qa_viewer_basic
}
if(@$options['showurllinks']){// we need to ensure here that we don't put new links inside existing ones
require_onceQA_INCLUDE_DIR.'qa-util-string.php';
require_onceQA_INCLUDE_DIR.'util/string.php';
$htmlunlinkeds=array_reverse(preg_split('|<[Aa]\s+[^>]+>.*</[Aa]\s*>|',$html,-1,PREG_SPLIT_OFFSET_CAPTURE));// start from end so we substitute correctly