Ignore:
Timestamp:
2014-12-28T18:59:56+01:00 (11 years ago)
Author:
Don-vip
Message:

see #10696 - allow URLs without protocol

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/validation/routines/UrlValidator.java

    r7779 r7902  
    157157    private static final Pattern PORT_PATTERN = Pattern.compile(PORT_REGEX);
    158158
    159     private static final String SIMPLE_WEBSITE = "^www[.].*";
    160     private static final Pattern SIMPLE_WEBSITE_PATTERN = Pattern.compile(SIMPLE_WEBSITE);
    161 
    162159    /**
    163160     * Holds the set of current validation options.
     
    301298        if (!isValidScheme(scheme)) {
    302299            setErrorMessage(tr("URL contains an invalid protocol: {0}", scheme));
    303             if (SIMPLE_WEBSITE_PATTERN.matcher(value).matches()) {
    304                 setFix("http://" + value);
    305             }
    306300            return false;
    307301        }
Note: See TracChangeset for help on using the changeset viewer.