summaryrefslogtreecommitdiff
path: root/stupid_template_engine.php
diff options
context:
space:
mode:
Diffstat (limited to 'stupid_template_engine.php')
-rw-r--r--stupid_template_engine.php5
1 files changed, 4 insertions, 1 deletions
diff --git a/stupid_template_engine.php b/stupid_template_engine.php
index b231e12..81a7688 100644
--- a/stupid_template_engine.php
+++ b/stupid_template_engine.php
@@ -1360,7 +1360,10 @@ class STEStandardLibrary
static public function escape($ste, $params, $sub)
{
- return htmlentities($sub($ste), ENT_QUOTES, "UTF-8");
+ if($ste->evalbool($params["lines"]))
+ return nl2br(htmlspecialchars(str_replace("\r\n", "\n", $sub($ste))));
+ else
+ return htmlspecialchars($sub($ste));
}
static public function strlen($ste, $params, $sub)