[ http://issues.apache.org/struts/browse/WW-1311?page=comments#action_37341
]
tm_jee commented on WW-1311:
----------------------------
corrected the regexp for client-side validation, its now
(^(ftp|http|https):\/\/(\.[_A-Za-z0-9-]+)*(@?([A-Za-z0-9-])+)?(\.[A-Za-z0-9-]+)*((\.[A-Za-z0-9]{2,})|(\.[A-Za-z0-9]{2,}\.[A-Za-z0-9]{2,}))(:[0-9]+)?([/A-Za-z0-9?#_-]*)?$)
it should validate (at the client-side) ok now.
As for the server side, OSCore TextUtils.verifyUrl(String) is using java's
URL(...) to determine it the url is ok. It seems that
"http://www.jroller.com1/qwe?qwe (domen - com1)"
is being treated as java's URL object as a valid url, hence no
MalformURLException is thrown. I don't think there's much we could do unless we
don't rely on oscore's TextUtils.verifyUrl(String) and parse it in UrlValidator
using regular expression.
> url validator does not work as expected (client and server side) under some
> circumstances
> -----------------------------------------------------------------------------------------
>
> Key: WW-1311
> URL: http://issues.apache.org/struts/browse/WW-1311
> Project: Struts Action 2
> Type: Bug
> Versions: WW 2.2.2
> Reporter: tm_jee
> Assignee: tm_jee
> Fix For: 2.0
>
> see http://forums.opensymphony.com/thread.jspa?threadID=30171&tstart=0 for
> more info
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/struts/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira