You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Some helpers are added the functionality of auto-escaping for security.
128
128
129
+
### Adding Your Functions
130
+
131
+
You can add your functions with configuration:
132
+
133
+
~~~php
134
+
$config = [
135
+
'functions' => ['my_helper'],
136
+
'functions_safe' => ['my_safe_helper'],
137
+
];
138
+
$this->load->library('twig', $config);
139
+
~~~
140
+
141
+
If your function explicitly outputs HTML code, you will want the raw output to be printed. In such a case, use `functions_safe`, and you have to make sure the output of the function is XSS free.
0 commit comments