myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Carlos Adolfo Ortiz Quiros" <carlos.or...@trebol.com.co>
Subject RE: An Extensions Filter Bug
Date Wed, 28 Nov 2007 20:42:51 GMT
I am using Tomahawk library, JSF1.2, and traed the f:verbatim and nothing happened that way.
It is the extension filter.

-----Mensaje original-----
De: Scott O'Bryan [mailto:darkarena@gmail.com] 
Enviado el: Wednesday, November 28, 2007 3:42 PM
Para: MyFaces Development
Asunto: Re: An Extensions Filter Bug

Are you using JSF 1.2 or JSF 1.1. If you are using 1.1, you'll either 
want to use the f:verbatum tag to wrap non-faces content.

Scott

Carlos Adolfo Ortiz Quiros wrote:
>
> HI you all
>
> After a great amount of time trying to find why web page in the source 
> code gets altered I concluded that the Extensions Filter is doing 
> something that should not be doing or perhaps I don't know how to fix.
>
> Here is the situation.
>
> First code sample
>
> <%@ page contentType="text/html;charset=windows-1252"%>
>
> <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
>
> <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
>
> <f:view>
>
> <html>
>
> <head>
>
> <meta http-equiv="Content-Type"
>
> content="text/html; charset=windows-1252"/>
>
> <meta name="Eddy Johana Angarita Navarro" content="TRÉBOL Software 
> S.A."></meta>
>
> <script type="text/javascript" language="JavaScript">
>
> //Valida la longitud de un texto.
>
> function validaLongitud(texto, longitud, e) {
>
> if (!e) e = window.event;
>
> if (!isEdicionKey(e) && texto.value.length >= longitud) {
>
> *alert("No puede digitar más de " + longitud + " caracteres.");*
>
> return false;
>
> }
>
> return true;
>
> }
>
> // Valida si la tecla presionada es de edición.
>
> // Utilizar unicamente en evento "onkeydown".
>
> function isEdicionKey(e) {
>
> if (!e) e = window.event;
>
> var key = e.which ? e.which : e.keyCode;
>
> return (key==8 || key==9 || (key >= 33 && key <= 40) || key==45 || 
> key==46);
>
> }
>
> function doOnKeyDown(e) {
>
> var obj = document.getElementById("frmSistemas:nombreSistema");
>
> validaLongitud(obj.value, 10, e);
>
> }
>
> </script>
>
> <title>This is a full text sample</title>
>
> </head>
>
> <body onload="*alert('más o áéíóúñÑ'*);">This is it verbatim and 
> m&aacute;s to
>
> this<h:form>
>
> <h:inputText maxlength="10" onkeypress="return validaLongitud(this, 
> 10, event);"/>
>
> </h:form></body>
>
> </html>
>
> </f:view>
>
> See the text in bold above.
>
> I am using MyFaces tomahawk and have configured the ExtensionsFilter 
> as stated in the page 
> http://myfaces.apache.org/tomahawk/extensionsFilter.html
>
> I have put this page in a tomcat server and captured the generated 
> java code and the characters are preserved but when I look at the 
> source code in the Internet Browser, it gets altered to HTML 
> characters, that is á is changed to &aacute; or &#255;.
>
> See in page
>
> <%@ page contentType="text/html;charset=windows-1252"%>
>
> <meta http-equiv="Content-Type"
>
> content="text/html; charset=windows-1252"/>
>
> To enforce page is interpreted correctly by browser
>
> I think this is a bug because the whole page should not be encoded, 
> only what needed by the filter.
>
> Is there a way to fix this or it is indeed a bug in the library.
>
> **CARLOS ADOLFO ORTIZ Q**
>
> Ingeniero de Desarrollo
>
> **TRÉBOL Software S.A.******
>
> Tel : (574)3110663 Fax : (574)3113474
>
> Dirección Cll 16 # 28-195
>
> Medellín - Colombia
>
> http://www.trebol.com.co <http://www.trebol.com.co/>
>
> La información de este mensaje y sus anexos son propiedad exclusiva
> de TRÉBOL Software S.A. Es  únicamente para el uso del destinatario
> intencional  y  pueden  contener  información de carácter privado o
> confidencial. Le  informamos que cualquier revisión, retransmisión,
> divulgación,  copia  o  uso  indebido  del mismo está estrictamente
> prohibida  y será sancionada legalmente.
>
>
>
> Information contained in this message and every attachment is property of TREBOL Software
S.A. Only the destiny user is able to make use of the data here contained, which is private
and/or confidential. Any revision, broadcasting, spreading, copy or illegal use of this information
is strictly prohibited and will be sanctioned by legal means.



La información de este mensaje y sus anexos son propiedad exclusiva
de TRÉBOL Software S.A. Es  únicamente para el uso del destinatario
intencional  y  pueden  contener  información de carácter privado o
confidencial. Le  informamos que cualquier revisión, retransmisión,
divulgación,  copia  o  uso  indebido  del mismo está estrictamente
prohibida  y será sancionada legalmente.



Information contained in this message and every attachment is property of TREBOL Software
S.A. Only the destiny user is able to make use of the data here contained, which is private
and/or confidential. Any revision, broadcasting, spreading, copy or illegal use of this information
is strictly prohibited and will be sanctioned by legal means.
Mime
View raw message