From 191a21d461debcce05719a17f36bec8fbf1ef7d4 Mon Sep 17 00:00:00 2001 From: Meik Sievertsen Date: Thu, 20 Jul 2006 18:39:00 +0000 Subject: [PATCH] could have been a copy&paste error, but the expression is also removing the tag from valid script blocks (javascript for example). :) git-svn-id: file:///svn/phpbb/trunk@6195 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/includes/functions_template.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/phpBB/includes/functions_template.php b/phpBB/includes/functions_template.php index ac15244687..d9368ef395 100644 --- a/phpBB/includes/functions_template.php +++ b/phpBB/includes/functions_template.php @@ -136,12 +136,13 @@ class template_compile // php is a no-no. There is a potential issue here in that non-php // content may be removed ... however designers should use entities // if they wish to display < and > +/* $match_php_tags = array('#\<\?php.*?\?\>#is', '#<[^\w<]*(script)(((?:"[^"]*"|\'[^\']*\'|[^<>\'"])+)?(language[^<>\'"]+("[^"]*php[^"]*"|\'[^\']*php[^\']*\'))((?:"[^"]*"|\'[^\']*\'|[^<>\'"])+)?)?>.*?#is', '#\<\?.*?\?\>#s', '#\<%.*?%\>#s'); $code = preg_replace($match_php_tags, '', $code); +*/ // An alternative to the above would be calling this function which would be the ultimate solution but also has it's drawbacks. - // At the moment it is commented out until we decide which method to use. -// $this->remove_php_tags($code); + $this->remove_php_tags($code); // Pull out all block/statement level elements and seperate plain text preg_match_all('#(.*?)#s', $code, $matches);