summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDoug Green2007-07-22 11:33:21 (GMT)
committer Doug Green2007-07-22 11:33:21 (GMT)
commitd7c52b30855e25744a9884b7fc03131cae15f847 (patch)
tree69279f1f513c6c248a05dd0df6bd5fc0501d9652
parentad11e29092a75a913492b02b30a13bc41b32c5de (diff)
#157581 - bug found by Steven - only look for trailing ?> outside quotes
-rw-r--r--coder.module18
1 files changed, 9 insertions, 9 deletions
diff --git a/coder.module b/coder.module
index 49d488f..ab54835 100644
--- a/coder.module
+++ b/coder.module
@@ -779,17 +779,9 @@ function _coder_read_and_parse_file(&$coder_args) {
$this_all_lines .= $char;
if ($in_php) {
- // look for the ending php tag which tags precedence over everything
- if ($char == '?' && $content[$pos + 1] == '>') {
- unset($char);
- $in_php = 0;
- $this_all_lines .= '>';
- $pos ++;
- }
-
// when in a quoted string, look for the trailing quote
// strip characters in the string, replacing with '' or ""
- elseif ($in_quote) {
+ if ($in_quote) {
if ($in_backslash) {
$in_backslash = 0;
}
@@ -835,6 +827,14 @@ function _coder_read_and_parse_file(&$coder_args) {
unset($char);
}
+ // look for the ending php tag
+ elseif ($char == '?' && $content[$pos + 1] == '>') {
+ unset($char);
+ $in_php = 0;
+ $this_all_lines .= '>';
+ $pos ++;
+ }
+
// when in a comment look for the trailing comment
elseif ($in_comment) {
$this_comment_lines .= $char;