You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Carlos Adolfo Ortiz Quiros <ca...@trebol.com.co> on 2007/12/03 14:41:18 UTC

Help on Tomahawk Extensions Filter

 

Hi you all

Is there a way to not let the Tomahawk Extension filter not encode the whole page.

That is

If I have a page like this

<html>

<meta>

  <script>

   function a()

   {

     alert("alerta mañana");

   }

 </script>

...

</html>

 

Notice the word mañana, which has extended ascii characters, I have put the correct encoding in the page as 

<%@ page session="false" contentType="text/html;charset=ISO-8859-1"%>

<meta HTTP-EQUIV="Content-Type" CONTENT="text/html;charset=ISO-8859-1" />

Thus JSF encodes the page correctly by emitting the code for ñ as is.

But the strange thing comes when the filter gets applied, the whole page gets converted to the ISO-8859-1code page changing the ñ to the &#nnn; HTML convention, showing it incorrectly in my page, which is something it must not do.

 

 

 

 

I have asked this in the development list but I have not got a reply more than a patch applied to the version 1.1.2

 

Is there a way to circumvent all of this in a manner that the filter is useful to the <t:xxx> components and all the code emitted is correctly encoded not losing the original intention of the characters typed in the JSP page.

 

Thanks in advance.

 

 

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.

Re: Help on Tomahawk Extensions Filter

Posted by David Delbecq <de...@oma.be>.
Use streamingAddRessource, that way the tomahawk extension filter won't 
try to parse and fix your html while adding the ressources of tomahawk 
components. But this requires you to use the t:document , t:head and 
t:body tags!

En l'instant précis du 03/12/07 14:41, Carlos Adolfo Ortiz Quiros 
s'exprimait en ces termes:
>
> Hi you all
>
> Is there a way to not let the Tomahawk Extension filter not encode the 
> whole page.
>
> That is
>
> If I have a page like this
>
> <html>
>
> <meta>
>
> <script>
>
> function a()
>
> {
>
> alert(“alerta mañana”);
>
> }
>
> </script>
>
> …
>
> </html>
>
> Notice the word mañana, which has extended ascii characters, I have 
> put the correct encoding in the page as
>
> <%@ page session="false" contentType="text/html;charset=ISO-8859-1"%>
>
> <meta HTTP-EQUIV="Content-Type" CONTENT="text/html;charset=ISO-8859-1" />
>
> Thus JSF encodes the page correctly by emitting the code for ñ as is.
>
> But the strange thing comes when the filter gets applied, the whole 
> page gets converted to the ISO-8859-1code page changing the ñ to the 
> &#nnn; HTML convention, showing it incorrectly in my page, which is 
> something it must not do.
>
> I have asked this in the development list but I have not got a reply 
> more than a patch applied to the version 1.1.2
>
> Is there a way to circumvent all of this in a manner that the filter 
> is useful to the <t:xxx> components and all the code emitted is 
> correctly encoded not losing the original intention of the characters 
> typed in the JSP page.
>
> Thanks in advance.
>
> **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.


-- 
http://www.devlog.be (a belgian developer's logs)



Re: Help on Tomahawk Extensions Filter

Posted by Nitin Deshmukh <de...@yahoo.com>.
You need to have the page encoding as UTF-8.

--- Carlos Adolfo Ortiz Quiros
<ca...@trebol.com.co> wrote:

>  
> 
> Hi you all
> 
> Is there a way to not let the Tomahawk Extension
> filter not encode the whole page.
> 
> That is
> 
> If I have a page like this
> 
> <html>
> 
> <meta>
> 
>   <script>
> 
>    function a()
> 
>    {
> 
>      alert("alerta mañana");
> 
>    }
> 
>  </script>
> 
> ...
> 
> </html>
> 
>  
> 
> Notice the word mañana, which has extended ascii
> characters, I have put the correct encoding in the
> page as 
> 
> <%@ page session="false"
> contentType="text/html;charset=ISO-8859-1"%>
> 
> <meta HTTP-EQUIV="Content-Type"
> CONTENT="text/html;charset=ISO-8859-1" />
> 
> Thus JSF encodes the page correctly by emitting the
> code for ñ as is.
> 
> But the strange thing comes when the filter gets
> applied, the whole page gets converted to the
> ISO-8859-1code page changing the ñ to the &#nnn;
> HTML convention, showing it incorrectly in my page,
> which is something it must not do.
> 
>  
> 
>  
> 
>  
> 
>  
> 
> I have asked this in the development list but I have
> not got a reply more than a patch applied to the
> version 1.1.2
> 
>  
> 
> Is there a way to circumvent all of this in a manner
> that the filter is useful to the <t:xxx> components
> and all the code emitted is correctly encoded not
> losing the original intention of the characters
> typed in the JSP page.
> 
>  
> 
> Thanks in advance.
> 
>  
> 
>  
> 
> 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.



      ____________________________________________________________________________________
Never miss a thing.  Make Yahoo your home page. 
http://www.yahoo.com/r/hs