Skip to content

Commit 1266f73

Browse files
committed
Unescape short PHP and ASP tags
They are interpreted otherwise and JS modified to produce false positive.
1 parent cfee2c0 commit 1266f73

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

processes/on-editor-load.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -180,8 +180,8 @@
180180
caretChunk = thisCM.getValue().substr(0,top.ICEcoder.caretPos+1);
181181

182182
if(caretChunk.lastIndexOf("<script")>caretChunk.lastIndexOf("/script>")&&caretLocType=="Unknown") {caretLocType = "JavaScript";}
183-
else if (caretChunk.lastIndexOf("<?")>caretChunk.lastIndexOf("?>")&&caretLocType=="Unknown") {caretLocType = "PHP";}
184-
else if (caretChunk.lastIndexOf("<%")>caretChunk.lastIndexOf("%>")&&caretLocType=="Unknown") {caretLocType = "Ruby";}
183+
else if (caretChunk.lastIndexOf("<\?")>caretChunk.lastIndexOf("?\>")&&caretLocType=="Unknown") {caretLocType = "PHP";}
184+
else if (caretChunk.lastIndexOf("<\%")>caretChunk.lastIndexOf("%\>")&&caretLocType=="Unknown") {caretLocType = "Ruby";}
185185
else if (caretChunk.lastIndexOf("<style")>caretChunk.lastIndexOf("/style>")&&caretLocType=="Unknown") {caretLocType = "CSS";}
186186
else if (caretChunk.lastIndexOf("<")>caretChunk.lastIndexOf(">")&&caretLocType=="Unknown") {caretLocType = "HTML";}
187187
else if (caretLocType=="Unknown") {caretLocType = "Content";};

0 commit comments

Comments
 (0)