I do not use the built-in event handlers - for the same reason, I refuse to use the style attribute for css. JQuery simply simplifies the implementation of class="foo" on html and $('.foo').click( function () {} ) in an external .js file.
But in order to do everything possible to answer this question, look at these documents on Template::Filter for those that are in the kernel.
It seems you could do [% s | replace( "'", "\'" ) %] [% s | replace( "'", "\'" ) %] to avoid single quotes. Or you can probably write a more complex javascript sanitizer parser that only allows function calls and create your own Template :: Filter
source share