mojarra icon indicating copy to clipboard operation
mojarra copied to clipboard

By <h:outputText> the HTML tag is not displayed properly in JSF1.2+

Open caim2015 opened this issue 7 years ago • 1 comments

I am trying set the HTML tag in outputText, as following:

<h:outputText value="<input type='hidden' id='TestInclude7' name='RMSTKN' value='" escape="false"/><%=TestUtility.getJspToken(session,request)%><h:outputText value="'>" escape="false"/>

TestUtility.getJspToken returns a string "123456789".

The test result:

JSF1.1 <input type='hidden' id='TestInclude7' name='RMSTKN' value='123456789'>

JSF1.2 <input type='hidden' id='TestInclude7' name='RMSTKN' value='

   123456789'>

JSF2.2 <input type='hidden' id='TestInclude7' name='RMSTKN' value='

   123456789'>

In the JSF1.1, input tag is displayed properly. but in the JSF1.2+,there are extra line feeds in the back of the [value='].

I hava provided the reproducer(Tomcat8jsf11.war,Tomcat8jsf12.war). http://localhost:8080/Tomcat8jsf11/index.jsf http://localhost:8080/Tomcat8jsf12/index.jsf sample.zip

caim2015 avatar Jun 22 '18 03:06 caim2015

Hi, What do you think of this bug? Do you hava a try with the provided reproducer? Looking forward to your reply.

caim2015 avatar Jun 28 '18 05:06 caim2015