Changeset 808 for trunk/grails-app


Ignore:
Timestamp:
Feb 16, 2011, 3:34:01 AM (13 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.