Fix: view compilation error when using % tags

When using {% (js code) \n%}, the \n is removed and the %} tag is next
to a javascript statement causing a parsing error.
Eg:
{%
myArray = [];
%}
=> {%myArray=[];%} instead of {% myArray=[]; %}