From cc6f03a62d719a619f95fb26663fa886e3d943d0 Mon Sep 17 00:00:00 2001 From: Nathan Adams Date: Sun, 9 Mar 2014 23:10:52 -0500 Subject: [PATCH] Fixing issue with filter --- indefero/src/IDF/templates/idf/wiki/viewPage.html | 3 --- pluf/src/Pluf/Text/HTML/Filter.php | 13 +++++++++---- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/indefero/src/IDF/templates/idf/wiki/viewPage.html b/indefero/src/IDF/templates/idf/wiki/viewPage.html index c6d1167..43a2cf4 100644 --- a/indefero/src/IDF/templates/idf/wiki/viewPage.html +++ b/indefero/src/IDF/templates/idf/wiki/viewPage.html @@ -27,9 +27,6 @@ by {$submitter}.{/blocktrans}

{trans 'Table of Content'}

{$page.summary}

- {literal} - - {/literal} {markdown $rev.content, $request} diff --git a/pluf/src/Pluf/Text/HTML/Filter.php b/pluf/src/Pluf/Text/HTML/Filter.php index c62c426..74180e6 100644 --- a/pluf/src/Pluf/Text/HTML/Filter.php +++ b/pluf/src/Pluf/Text/HTML/Filter.php @@ -125,6 +125,8 @@ class Pluf_Text_HTML_Filter */ public $allow_hexadecimal_entities = 1; + public $check_tags_flag = 0; + public $allowed_entities = array( 'amp', 'gt', @@ -173,10 +175,13 @@ class Pluf_Text_HTML_Filter function check_tags($data) { - $data = preg_replace("/<(.*?)>/se", "\$this->process_tag(\$this->StripSingle('\\1'))", $data); - foreach (array_keys($this->tag_counts) as $tag) { - for ($i=0; $i<$this->tag_counts[$tag]; $i++) { - $data .= ""; + if ($this->check_tags_flag) + { + $data = preg_replace("/<(.*?)>/se", "\$this->process_tag(\$this->StripSingle('\\1'))", $data); + foreach (array_keys($this->tag_counts) as $tag) { + for ($i=0; $i<$this->tag_counts[$tag]; $i++) { + $data .= ""; + } } } return $data;