You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@beehive.apache.org by "Carlin Rogers (JIRA)" <be...@incubator.apache.org> on 2005/05/04 23:49:06 UTC

[jira] Resolved: (BEEHIVE-490) Provide a mechanism (netui-config flag) to allow overriding URL encoding of href attributes in tags

     [ http://issues.apache.org/jira/browse/BEEHIVE-490?page=all ]
     
Carlin Rogers resolved BEEHIVE-490:
-----------------------------------

    Resolution: Fixed

Hi Krista,

I think this is resolved...

The setting of url-encode-urls is used to determine what we
should do when we read an href URL of a NetUI tag such as
<netui:anchor>. By default it is set to true and we will 
encode the URL, escaping characters such as '%'. 

However, if an application was written such that the href 
values were already encoded (e.g. using "%25" rather than 
a '%'), we do not want to encode the URL again.

In this case, the setting url-encode-urls to false in the 
beehive-netui-config.xml file. This will keep us from 
encoding the URL and changing "%25" to "%2525".

All this should be independent of how we write out the
parameter separator for the query of the URL. Encoding
the href or not, we should still output "&amp;" as the
parameter separator be default unless <html-amp-entity>
is set to false.

So I had different behavior from you. For url-encode-urls 
set to true and a JSP with the tag...

<netui:anchor 
    href="test.do?pertest=100%&entity=true&amp;foo=1">
test
</netui:anchor>

I get the HTML page with...

<a href="/coreWeb/t/test.do?pertest=100%25&amp;entity=true&amp;foo=1">test</a>

The '%' char gets encoded to "%25", the '&' and the "&amp;" are both 
parsed as parameter separators in the query of the href URL. 
We handle the use of both. The result is written out using
the "&amp;" entity in the URL, our default behavior (i.e. 
html-amp-entity = true).

Note that encoding the incoming URLs is independent of 
using the '&' char versus "&amp;" entity
to separate parameters when writing out the query of
the resulting URL. 

Hope this helps.

> Provide a mechanism (netui-config flag) to allow overriding URL encoding of href attributes in tags
> ---------------------------------------------------------------------------------------------------
>
>          Key: BEEHIVE-490
>          URL: http://issues.apache.org/jira/browse/BEEHIVE-490
>      Project: Beehive
>         Type: Improvement
>   Components: NetUI
>     Versions: V1Beta
>     Reporter: Carlin Rogers
>     Assignee: Carlin Rogers
>     Priority: Minor
>      Fix For: V1
>  Attachments: useamppatch.tar.gz
>
> Some users may want to write their URL for tags with href as already 
> encoded strings. We should provide a mechanism that allows users
> to disable the default behavior of applying URL encoding the href 
> attributes. If a user has already encoded a string, applying an
> encoding will create undesirable results.
> See JIRA Beehive-488 for related details about encoding.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira