Foren
$ and { is stripped in HTML
Muhammed Shakir AK Misarwala, geändert vor 11 Jahren.
$ and { is stripped in HTML
Junior Member Beiträge: 36 Beitrittsdatum: 26.02.09 Neueste Beiträge
Hi Everyone,
Check the following code snippet :
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.
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.
jelmer kuperus, geändert vor 11 Jahren.
RE: $ and { is stripped in HTML
Liferay Legend Beiträge: 1191 Beitrittsdatum: 10.03.10 Neueste Beiträge
Add the following jsp page directive add the top of your page :
<%@ page isELIgnored="true" %>