Changeset 808


Ignore:
Timestamp:
02/16/11 03:34:01 (8 years ago)
Author:
gav
Message:

Make custom taglib domainValidator more lenient.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/grails-app/taglib/CustomTagLib.groovy

    r798 r808  
    288288 
    289289        def schemes = ["http","https", "ftp"] as String[] 
    290         def domainValidator = new RegexValidator("localhost(:(\\d{1,5}))?") 
     290        //def domainValidator = new RegexValidator("localhost(:(\\d{1,5}))?") 
     291        def domainValidator = new RegexValidator(".*(:(\\d{1,5}))?") // Any domain, incl user@host:port 
    291292        def validator = new UrlValidator(schemes, domainValidator, UrlValidator.ALLOW_2_SLASHES) 
    292293        return validator.isValid(url) 
Note: See TracChangeset for help on using the changeset viewer.