aboutsummaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorjgmdev <jgmdev@gmail.com>2022-10-27 21:33:21 -0400
committerjgmdev <jgmdev@gmail.com>2022-10-27 23:19:49 -0400
commit0ed28fd0c58452591283fdcb949fd8e49b02a657 (patch)
treefbb583f2ca7663b119d76bc83ebfc93da021f626 /plugins
parentc24cea177b7de6ae57178496ac04d73b0a9d22f3 (diff)
downloadlite-xl-plugins-0ed28fd0c58452591283fdcb949fd8e49b02a657.tar.gz
lite-xl-plugins-0ed28fd0c58452591283fdcb949fd8e49b02a657.zip
language_php: fix strings not getting terminated
The issue can be triggered with code like the following: `'"'.strlen("test:").'"';` would cause the string end to not be found. The additional pattern on this commit allows properly terminating the string by not matching the last closing character.
Diffstat (limited to 'plugins')
-rw-r--r--plugins/language_php.lua1
1 files changed, 1 insertions, 0 deletions
diff --git a/plugins/language_php.lua b/plugins/language_php.lua
index fda30cb..2820862 100644
--- a/plugins/language_php.lua
+++ b/plugins/language_php.lua
@@ -87,6 +87,7 @@ local inline_variables = {
},
{ pattern = "%$[%a_][%w_]*", type = "keyword2" },
{ pattern = "%w+", type = "string" },
+ { pattern = "[^\"]", type = "string" },
}
local function combine_patterns(t1, t2)