- Cleaned up a bit and added some methods to give Lean/Console more flexibility

This commit is contained in:
mcndave committed 2022-11-29 19:46:40 +00:00
1 parent 531f786747
commit 4bd4cddbff
7 files changed
+78 -26

No files matched your search

+1 -1
View File
@@ -23,7 +23,7 @@ class EchoSafeToken implements Syntax {
$sourceCode = preg_replace_callback("#({$this->tokenOpen})(.*?)({$this->tokenClose})#s", function ($matches) {
$line = trim($matches[2], " \t\n\r\0\x0B;");
return "<?php echo htmlspecialchars({$line}, {$this->flag}, '{$this->encoding}', " . ($this->doubleEncode ? "true" : "false") . ") ?>";
return "<?php echo htmlspecialchars((string) ({$line}), {$this->flag}, '{$this->encoding}', " . ($this->doubleEncode ? "true" : "false") . ") ?>";
}, $sourceCode);
}