Fórum

$ and { is stripped in HTML

thumbnail
Muhammed Shakir AK Misarwala, modificado 11 Anos atrás.

$ and { is stripped in HTML

Junior Member Postagens: 36 Data de Entrada: 26/02/09 Postagens Recentes
Hi Everyone,

Check the following code snippet :


 <div id="cd">
       <h5>Hello ${theTitle} </h5>
 </div>
<script>
    var ob2 = document.getElementById("cd");
    alert(ob2.innerHTML);
</script>


Write the above code in .jsp of any portlet in Liferay 6.0 and prior. You will see that the complete innerHTML is shown in the alert i.e. <h5>Hello ${theTitle}</h5> Now write the same in Liferay 6.1 GA2. You will notice that the entire thing written in ${......} is stripped including the $ and brace brackets. The alert will print only <h5>Hello</h5>

I have checked the filter etc - but could not find anything. I will be grateful to any help or pointer towards the solution.

Thanks in Advance.
thumbnail
jelmer kuperus, modificado 11 Anos atrás.

RE: $ and { is stripped in HTML

Liferay Legend Postagens: 1191 Data de Entrada: 10/03/10 Postagens Recentes
Add the following jsp page directive add the top of your page :

&lt;%@ page isELIgnored="true" %&gt;