You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Leonardo Uribe <lu...@gmail.com> on 2013/10/09 11:09:12 UTC

Re: %20 instead of space with passthrough

Hi

Doing some black box tests against Mojarra, it seems there is no URI
encoding at all. Fixed in:

https://issues.apache.org/jira/browse/MYFACES-3801

regards,

Leonardo Uribe



2013/9/30 Karl Kildén <ka...@gmail.com>

> Hello,
>
> If we assume that a) It's reproducible for others and b) it works in
> Mojarra it should probably be changed per your suggestion. This however is
> a little beyond what I can really comment on for now but if it helps I can
> test a & b
>
> / Karl
>
>
> On 30 September 2013 09:00, Leonardo Uribe <lu...@gmail.com> wrote:
>
> > Hi
> >
> > Maybe the fix we need to do should be in writeURIAttribute. For example,
> in
> > this case the value is not an URI, so it should not be encoded. The
> > implementation in myfaces always encode. There is evidence out there that
> > the encode is not expected.
> >
> > regards,
> >
> > Leonardo Uribe
> > On Sep 29, 2013 9:41 PM, "Leonardo Uribe" <lu...@gmail.com> wrote:
> >
> > > Hi
> > >
> > > In the renderkit javadoc of jsf 2.2 spec says this (Rendering Pass
> > > Through Attributes):
> > >
> > > "... The ResponseWriter must ensure that any *pass through
> > attributes*are rendered on the outer-most markup element for the
> component.
> > If there
> > > is a *pass through attribute* with the same name as a *renderer
> specific
> > > attribute*, the *pass through attribute* takes precedence. *Pass
> through
> > > attributes* are rendered as if they were passed to
> > > ResponseWriter.writeURIAttribute(). ..."
> > >
> > > The code just do what the spec says, and that includes encode spaces in
> > > passthrough attributes. Sounds like something intentionally left in
> that
> > > way. Maybe this is something to discuss on the Expert Group.
> > >
> > > regards,
> > >
> > > Leonardo Uribe
> > >
> > >
> > >
> > > 2013/9/29 Karl Kildén <ka...@gmail.com>
> > >
> > >> Hi Leo and thanks for the reply.
> > >>
> > >> It did not help.
> > >>
> > >> Here's my html: https://gist.github.com/karlkilden/6754541
> > >>
> > >> cheers
> > >>
> > >>
> > >> On 29 September 2013 19:14, Leonardo Uribe <lu...@gmail.com> wrote:
> > >>
> > >> > Hi
> > >> >
> > >> > Try setting the page encoding to UTF-8. I suppose in that case, the
> > >> default
> > >> > response writer does not found the encoding, so in that case it
> escape
> > >> the
> > >> > space.
> > >> >
> > >> > regards,
> > >> >
> > >> > Leonardo Uribe
> > >> >
> > >> >
> > >> >
> > >> > 2013/9/29 Karl Kildén <ka...@gmail.com>
> > >> >
> > >> > > Hello,
> > >> > >
> > >> > > I tried the snapshot: myfaces-bundle-2.2.0-20130927.112420-1540
> > >> > >
> > >> > > I got this simple snippet to work except spaces show as %20
> > >> > >
> > >> > > <html xmlns="http://www.w3.org/1999/xhtml"
> > >> > >             xmlns:h="http://xmlns.jcp.org/jsf/html"
> > >> > >             xmlns:pt="http://xmlns.jcp.org/jsf/passthrough">
> > >> > > <h:head><title>JSF 2.2</title></h:head>
> > >> > > <h:body>
> > >> > >     <h:form id="form">
> > >> > >         <h:inputText id="email" value="#{bean.email}"
> > >> > >                      pt:type="email" pt:placeholder="test test"/>
> > >> > >     </h:form>
> > >> > > </h:body>
> > >> > > </html>
> > >> > >
> > >> > > Am I missing something? No difference if I used a bundle rather
> then
> > >> > inline
> > >> > >
> > >> > > cheers
> > >> > >
> > >> >
> > >>
> > >
> > >
> >
>

Re: %20 instead of space with passthrough

Posted by Karl Kildén <ka...@gmail.com>.
Great!

Next time I will provide test comparison with mojarra in my question.

Cheers


On 9 October 2013 11:09, Leonardo Uribe <lu...@gmail.com> wrote:

> Hi
>
> Doing some black box tests against Mojarra, it seems there is no URI
> encoding at all. Fixed in:
>
> https://issues.apache.org/jira/browse/MYFACES-3801
>
> regards,
>
> Leonardo Uribe
>
>
>
> 2013/9/30 Karl Kildén <ka...@gmail.com>
>
> > Hello,
> >
> > If we assume that a) It's reproducible for others and b) it works in
> > Mojarra it should probably be changed per your suggestion. This however
> is
> > a little beyond what I can really comment on for now but if it helps I
> can
> > test a & b
> >
> > / Karl
> >
> >
> > On 30 September 2013 09:00, Leonardo Uribe <lu...@gmail.com> wrote:
> >
> > > Hi
> > >
> > > Maybe the fix we need to do should be in writeURIAttribute. For
> example,
> > in
> > > this case the value is not an URI, so it should not be encoded. The
> > > implementation in myfaces always encode. There is evidence out there
> that
> > > the encode is not expected.
> > >
> > > regards,
> > >
> > > Leonardo Uribe
> > > On Sep 29, 2013 9:41 PM, "Leonardo Uribe" <lu...@gmail.com> wrote:
> > >
> > > > Hi
> > > >
> > > > In the renderkit javadoc of jsf 2.2 spec says this (Rendering Pass
> > > > Through Attributes):
> > > >
> > > > "... The ResponseWriter must ensure that any *pass through
> > > attributes*are rendered on the outer-most markup element for the
> > component.
> > > If there
> > > > is a *pass through attribute* with the same name as a *renderer
> > specific
> > > > attribute*, the *pass through attribute* takes precedence. *Pass
> > through
> > > > attributes* are rendered as if they were passed to
> > > > ResponseWriter.writeURIAttribute(). ..."
> > > >
> > > > The code just do what the spec says, and that includes encode spaces
> in
> > > > passthrough attributes. Sounds like something intentionally left in
> > that
> > > > way. Maybe this is something to discuss on the Expert Group.
> > > >
> > > > regards,
> > > >
> > > > Leonardo Uribe
> > > >
> > > >
> > > >
> > > > 2013/9/29 Karl Kildén <ka...@gmail.com>
> > > >
> > > >> Hi Leo and thanks for the reply.
> > > >>
> > > >> It did not help.
> > > >>
> > > >> Here's my html: https://gist.github.com/karlkilden/6754541
> > > >>
> > > >> cheers
> > > >>
> > > >>
> > > >> On 29 September 2013 19:14, Leonardo Uribe <lu...@gmail.com>
> wrote:
> > > >>
> > > >> > Hi
> > > >> >
> > > >> > Try setting the page encoding to UTF-8. I suppose in that case,
> the
> > > >> default
> > > >> > response writer does not found the encoding, so in that case it
> > escape
> > > >> the
> > > >> > space.
> > > >> >
> > > >> > regards,
> > > >> >
> > > >> > Leonardo Uribe
> > > >> >
> > > >> >
> > > >> >
> > > >> > 2013/9/29 Karl Kildén <ka...@gmail.com>
> > > >> >
> > > >> > > Hello,
> > > >> > >
> > > >> > > I tried the snapshot: myfaces-bundle-2.2.0-20130927.112420-1540
> > > >> > >
> > > >> > > I got this simple snippet to work except spaces show as %20
> > > >> > >
> > > >> > > <html xmlns="http://www.w3.org/1999/xhtml"
> > > >> > >             xmlns:h="http://xmlns.jcp.org/jsf/html"
> > > >> > >             xmlns:pt="http://xmlns.jcp.org/jsf/passthrough">
> > > >> > > <h:head><title>JSF 2.2</title></h:head>
> > > >> > > <h:body>
> > > >> > >     <h:form id="form">
> > > >> > >         <h:inputText id="email" value="#{bean.email}"
> > > >> > >                      pt:type="email" pt:placeholder="test
> test"/>
> > > >> > >     </h:form>
> > > >> > > </h:body>
> > > >> > > </html>
> > > >> > >
> > > >> > > Am I missing something? No difference if I used a bundle rather
> > then
> > > >> > inline
> > > >> > >
> > > >> > > cheers
> > > >> > >
> > > >> >
> > > >>
> > > >
> > > >
> > >
> >
>