summaryrefslogtreecommitdiff
path: root/tests/test_autoescape/code.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test_autoescape/code.php')
-rw-r--r--tests/test_autoescape/code.php14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/test_autoescape/code.php b/tests/test_autoescape/code.php
new file mode 100644
index 0000000..4f7c998
--- /dev/null
+++ b/tests/test_autoescape/code.php
@@ -0,0 +1,14 @@
+<?php
+
+use kch42\ste\STECore;
+
+function test_func($ste) {
+ $ste->vars['test'] = 'foo"&<bar>';
+
+ $ste->register_tag('echoarg', function ($ste, $params, $sub) {
+ return $params['echo'];
+ });
+
+ // Autoescaping enabled by default
+ $ste->escape_method = STECore::ESCAPE_HTML;
+}