struts-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Maurizio Cucchiara (Resolved) (JIRA)" <>
Subject [jira] [Resolved] (WW-3688) JavaScript URL validator in the FreeMarker template fails many valid URLs
Date Mon, 03 Oct 2011 08:38:34 GMT


Maurizio Cucchiara resolved WW-3688.

       Resolution: Fixed
    Fix Version/s: 2.3
         Assignee: Maurizio Cucchiara

Thank you, Brett!
> JavaScript URL validator in the FreeMarker template fails many valid URLs
> -------------------------------------------------------------------------
>                 Key: WW-3688
>                 URL:
>             Project: Struts 2
>          Issue Type: Bug
>            Reporter: Brett Porter
>            Assignee: Maurizio Cucchiara
>             Fix For: 2.3
>         Attachments: WW-3688.diff
> As far as I can tell, it will not allow the following in the path/query of an URL:
> "&", ";", "=" (query string)
> "+", "%" (encoded characters)
> "." (extensions)
> There are several others.
> In addition, particular hosts are not valid due to a lack of country code:
> - localhost
> - (from IRIs)
> -
> My understanding of the URI specification ( is that
the following delimiters are valid unencoded: {{:/@!$&'()*+,;=}}, and the following characters
are also allowed: {{.-_~}}, as well as pct-encoded {{%xx}}
> I've attached a patch to allow the extra characters, and to use those definitions for
the userinfo and host as allowed in the spec. I've also broken out path, query and fragment
> There are still several other valid URIs that this won't allow (e.g. file:///..., IPv6
addresses), and there's a chance that the server-side validation (using will
differ to the client side - so it may be good to allow URL validation to be deferred to the
server as an option as well.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:!default.jspa
For more information on JIRA, see:


View raw message