[gatein-dev] Portal url creation with ampersands
Christophe Laprun
claprun at redhat.com
Thu Oct 28 06:46:44 EDT 2010
On Oct 28, 2010, at 11:02 AM, Julien Viet wrote:
> it's a good point,
>
> in the navigation controller framework it is possible to specify the kind of link that will be generated by the portal.
>
> so creating an URL would be like
>
> url.setMimeType(MimeType.XHTML);
> url.toString();
>
> or
>
> url.setMimeType(MimeType.PLAIN);
> url.toString();
I was thinking that maybe this should be an extra parameter on PortletInvocationContext.encodeResourceURL like there's already a URLFormat in the renderURL method (though, the passed format seems to be actually ignored in GateIn Portal, see ExoPortletInvocationContext.renderURL and the comment I had added a while ago)…
>
> On Oct 28, 2010, at 10:57 AM, Trong Tran wrote:
>
>> it says :
>>
>> Note that replacing & with & is only done when writing the URL in HTML, where "&" is a special character (along with "<" and ">"). When writing the same URL in a plain text email message or in the location bar of your browser, you would use "&" and not "&". With HTML, the browser translates "&" to "&" so the Web server would only see "&" and not "&" in the query string of the request.
>>
>> I think this is a good example of reason why we have used '&' standalone before.
>>
>> Anyway, I agree that the '&' would be used to generate an ULR by default and we could provide an option to be able to retrieve the another in such cases
>>
>>
>> On 27 October 2010 21:23, Matt Wringe <mwringe at redhat.com> wrote:
>> We are running into a bunch of problems with ajax requests when the
>> portal is used to create the urls (this is especially seen when using
>> wsrp as it needs to rewrite urls). The issue stems from the use of '&'
>> instead of '&', & alone is not allowed in xhtml/xml.
>>
>> I have already created a jira (with a patch) for this issue:
>> https://jira.jboss.org/browse/GTNPORTAL-1597
>>
>> Is there any objection or reasons why we can't use the proper '&'
>> instead?
>>
>> _______________________________________________
>> gatein-dev mailing list
>> gatein-dev at lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/gatein-dev
>>
>>
>>
>> --
>> Tran The Trong
>> eXo Platform SEA
>> _______________________________________________
>> gatein-dev mailing list
>> gatein-dev at lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/gatein-dev
>
> _______________________________________________
> gatein-dev mailing list
> gatein-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/gatein-dev
Cordialement / Best,
Chris
==
Principal Software Engineer / JBoss Enterprise Middleware Red Hat, Inc.
Follow GateIn: http://blog.gatein.org / http://twitter.com/gatein
Follow me: http://metacosm.codepuccino.com / http://twitter.com/metacosm
More information about the gatein-dev
mailing list