summaryrefslogtreecommitdiff
path: root/lib/fuckhtml.php
diff options
context:
space:
mode:
authorlolcat <will@lolcat.ca>2023-12-11 10:25:05 -0500
committerlolcat <will@lolcat.ca>2023-12-11 10:25:05 -0500
commit169f17b7b80e7ae590757a3f3345baa29ad8600e (patch)
tree4b70c0d703b873988b9488efe1e1c5310fae5baa /lib/fuckhtml.php
parent8ffb5a2712bdc2e744c768b2a5a07b6a32b14b40 (diff)
brave quote fix
Diffstat (limited to 'lib/fuckhtml.php')
-rw-r--r--lib/fuckhtml.php19
1 files changed, 18 insertions, 1 deletions
diff --git a/lib/fuckhtml.php b/lib/fuckhtml.php
index bd161ce..6abe085 100644
--- a/lib/fuckhtml.php
+++ b/lib/fuckhtml.php
@@ -367,6 +367,7 @@ class fuckhtml{
$bracket = false;
$is_close_bracket = false;
$escape = false;
+ $lastchar = false;
$json_out = null;
$last_char = null;
@@ -399,7 +400,21 @@ class fuckhtml{
break;
}
- $escape = $json[$i] == "\\" ? true : false;
+ if(
+ $json[$i] == "\\" &&
+ !(
+ $lastchar !== false &&
+ $lastchar . $json[$i] == "\\\\"
+ )
+ ){
+
+ $escape = true;
+ }else{
+
+ $escape = false;
+ }
+
+ $lastchar = $json[$i];
if(
$bracket === false &&
@@ -444,6 +459,8 @@ class fuckhtml{
$last_char = $json[$i];
}
+ echo "\n\n" . $json_out . "\n\n";
+
return json_decode($json_out, true);
}