I have the following js (in a string literal) returned in one of my plugin methods. Therefore, when I call a method, this puts it in my opinion. The problem is on the website, everything <, ", ', >, etc. Shielded in <, "and something else. How can i do this? I tried different methods, but none of them work: / I think this plugin may be old, so this was possible in earlier versions of Rails ...
%Q{<script type="text/javascript">
$(function() {
$('#{table_dom_id}').dataTable({
"oLanguage": {
"sSearch": "#{search_label}",
"sProcessing": '#{processing}'
},
"sPaginationType": "full_numbers",
"iDisplayLength":
"bProcessing": true,
"bServerSide":
"bLengthChange": false,
"bStateSave":
"bFilter":
"bAutoWidth":
"aoColumns": [
],
"fnServerData": function ( sSource, aoData, fnCallback ) {
aoData.push(
$.getJSON( sSource, aoData, function (json) {
fnCallback(json);
} );
}
})
});
</script>}
Any help is appreciated, thanks!
source
share