Developers' Forum

requesting clarification in documentation of Twig Escapers

requesting clarification in documentation of Twig Escapers

by Jim Newton -
Number of replies: 0

I'm reading section 6.1 of the documentation: https://coderunner.org.nz/mod/book/view.php?id=198&chapterid=812

There is still something that is unclear with the e('py') etc operator.   How do I know which language to specify in the single quotes?     Is this the language of the template, or is it the language of the student answer?    For example if the template is in language X and the student is typing code in language Y, do I need to escape e('X') or escape e('Y')?

In my opinion stating this clearly and unambiguously in the documentation would be helpful for new users such as myself.