]
David Waters updated RF-4560:
-----------------------------
Attachment: error.png
Error showing itself after ajax post.
numeric character reference being unescaped (Maybe in TidyParser?)
------------------------------------------------------------------
Key: RF-4560
URL:
https://jira.jboss.org/jira/browse/RF-4560
Project: RichFaces
Issue Type: Bug
Affects Versions: 3.2.1
Environment: Windows XP, Sun Java 1.6, Tomcat 6, MyFaces 1.2.3, Tomahawk 1.1.6
Reporter: David Waters
Attachments: correct.png, error.png, testAjax.jsp
Numeric character reference are being resolved and the character they represent is being
sent to the client instead of Numeric Character reference.
With the parser turned off for regular requests, the following code works correctly on
the first render but fails on the ajax update
[web.xml]
...
<filter>
<display-name>RichFaces Filter</display-name>
<filter-name>richfaces</filter-name>
<filter-class>org.ajax4jsf.Filter</filter-class>
<!-- Only filter on ajax request not every request
http://javablog.be/java/fix-your-richfaces-ajax-performance-problems/-->
<init-param>
<param-name>forceparser</param-name>
<param-value>false</param-value>
</init-param>
</filter>
...
[END]
[TEST PAGE]
<%@page pageEncoding="UTF-8" contentType="text/html;
charset=UTF-8" %>
<%@ taglib
uri="http://java.sun.com/jsf/core" prefix="f"%>
<%@ taglib
uri="http://java.sun.com/jsf/html" prefix="h"%>
<%@ taglib
uri="http://myfaces.apache.org/tomahawk"
prefix="t"%>
<%@ taglib
uri="http://richfaces.org/a4j" prefix="a4j"%>
<%@ taglib
uri="http://richfaces.org/rich" prefix="rich"%>
<f:view>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html
xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"
lang="en">
<meta http-equiv="Content-Type"
content="text/html;charset=UTF-8" />
<head>
</head>
<body>
<h:form id="Frm1">
<a4j:outputPanel id="panel">
<t:outputText id="textOut" value="•"
escape="false"/>
<a4j:commandButton reRender="panel"/>
</a4j:outputPanel>
</h:form>
</body>
</html>
</f:view>
[END]
[Network Trace for full request, response]
...
<span id="Frm1:panel">
<span id="Frm1:textOut">
•
</span>
<input id="Frm1:j_id_jsp_388183768_4"
name="Frm1:j_id_jsp_388183768_4"
onclick="A4J.AJAX.Submit('j_id_jsp_388183768_0','Frm1',event,{'parameters':{'Frm1:j_id_jsp_388183768_4':'Frm1:j_id_jsp_388183768_4'}
,'actionUrl':'/Coverzone/test/testAjax.jsf'} );return false;"
type="button" />
</span>
...
[END]
[Network Trace for Ajax response]
...
<span id="Frm1:panel">
<span id="Frm1:textOut">
?
</span>
<input id="Frm1:j_id_jsp_388183768_4"
name="Frm1:j_id_jsp_388183768_4"
onclick="A4J.AJAX.Submit('j_id_jsp_388183768_0','Frm1',event,{'parameters':{'Frm1:j_id_jsp_388183768_4':'Frm1:j_id_jsp_388183768_4'}
,'actionUrl':'/Coverzone/test/testAjax.jsf'} );return false;"
type="button" />
</span>
...
[END]
NOTE: the output of Frm1:textOut in first response is • in the ajax response
this is the char(149).
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: