iframe domains validation

SteveX
SteveX
@ultrajam
10 years ago
2,584 posts
I can't enter uwe.ac.uk as a domain in the iframe module. I get the following validation error:
Quote: You have entered an invalid value for "domain name" - value must be a valid domain name (no www)
Thanks!


--
¯\_(ツ)_/¯ Education, learning resources, TEL, AR/VR/MR, CC licensed content, panoramas, interactive narrative, sectional modules (like jrDocs), lunch at Uni of Bristol. Get in touch if you share my current interests or can suggest better :)

updated by @ultrajam: 07/29/15 10:30:42PM
douglas
@douglas
10 years ago
2,804 posts
Can you add ac.uk? I don't think it allows sub domains.


--

Douglas Hackney
Jamroom Team - Designer/Developer/Support
FAQ-Docs-Help Videos
michael
@michael
10 years ago
7,793 posts
Damn you people who don't use .com domains. ;)

We'll get that sorted out. Its an issue with the validation function.

--edit--
This is sorted in core 5.2.36 the next release version. If your desprate for it now you can adjust checktype.php to be this:

function jrCore_checktype_domain($input, $desc_only = false, $type_only = false){
    if ($desc_only) {
        return "a valid domain name (no www)";
    }
    if ($type_only) {
        return 'string';
    }
    // Make sure we get a good domain.tld
    if (strpos(' ' . $input, '.') && preg_match('/^[-a-z0-9]+\.[a-z]{2,14}$/', jrCore_str_to_lower($input))) {
        return true;
    }
    // or one of those double dot kinds uwe.ac.uk
    if (strpos(' ' . $input, '.') && preg_match('/^[-a-z0-9]+\.[a-z]{2,14}+\.[a-z]{2,14}$/', jrCore_str_to_lower($input))) {
        return true;
    }

    return false;
}

Thanks for finding that Steve. :)
updated by @michael: 06/26/15 07:43:04PM

Tags