Optimize encode_php_tags()
diff --git a/system/helpers/security_helper.php b/system/helpers/security_helper.php
index 3e6e914..7fcb184 100644
--- a/system/helpers/security_helper.php
+++ b/system/helpers/security_helper.php
@@ -123,7 +123,7 @@
*/
function encode_php_tags($str)
{
- return str_replace(array('<?php', '<?PHP', '<?', '?>'), array('<?php', '<?PHP', '<?', '?>'), $str);
+ return str_replace(array('<?', '?>'), array('<?', '?>'), $str);
}
}
diff --git a/system/libraries/Form_validation.php b/system/libraries/Form_validation.php
index 6d4446d..fb1c69c 100644
--- a/system/libraries/Form_validation.php
+++ b/system/libraries/Form_validation.php
@@ -1382,7 +1382,7 @@
*/
public function encode_php_tags($str)
{
- return str_replace(array('<?php', '<?PHP', '<?', '?>'), array('<?php', '<?PHP', '<?', '?>'), $str);
+ return str_replace(array('<?', '?>'), array('<?', '?>'), $str);
}
// --------------------------------------------------------------------