summaryrefslogtreecommitdiffstats
path: root/system/libraries/Input.php
diff options
context:
space:
mode:
Diffstat (limited to 'system/libraries/Input.php')
-rw-r--r--system/libraries/Input.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/system/libraries/Input.php b/system/libraries/Input.php
index 407990370..e7bf72779 100644
--- a/system/libraries/Input.php
+++ b/system/libraries/Input.php
@@ -656,11 +656,11 @@ class CI_Input {
{
// Images have a tendency to have the PHP short opening and closing tags every so often
// so we skip those and only do the long opening tags.
- $str = str_replace(array('<?php', '<?PHP'), array('&lt;?php', '&lt;?PHP'), $str);
+ $str = preg_replace('/<\?(php)/i', "&lt;?\\1", $str);
}
else
{
- $str = str_replace(array('<?php', '<?PHP', '<?', '?'.'>'), array('&lt;?php', '&lt;?PHP', '&lt;?', '?&gt;'), $str);
+ $str = str_replace(array('<?', '?'.'>'), array('&lt;?', '?&gt;'), $str);
}
/*