mersenneforum.org

mersenneforum.org (https://www.mersenneforum.org/index.php)
-   PrimeNet (https://www.mersenneforum.org/forumdisplay.php?f=11)
-   -   Invalid URL (https://www.mersenneforum.org/showthread.php?t=20374)

IvanP 2015-07-25 08:40

Invalid URL
 
In the [URL="http://www.mersenne.org/update/"]account settings page[/URL], it is stated that the website URL “must begin with "http://" or "https://"”, so it seems that https:// should also work, but by using it, I get an “Invalid URL” message. [URL="http://www.mersenne.org/2013/jsFormValidation.js"]This[/URL] would need to be redefined:

[CODE]
function IsValidURL(urlstring) {
return MatchesPattern(urlstring.toLowerCase(), 'http:\\/\\/[\\w\\-]+(\\.[\\w\\-]+)+');
}[/CODE]I just wanted to point that out.

Madpoo 2015-07-26 05:46

[QUOTE=IvanP;406455]In the [URL="http://www.mersenne.org/update/"]account settings page[/URL], it is stated that the website URL “must begin with "http://" or "https://"”, so it seems that https:// should also work, but by using it, I get an “Invalid URL” message. [URL="http://www.mersenne.org/2013/jsFormValidation.js"]This[/URL] would need to be redefined:

[CODE]
function IsValidURL(urlstring) {
return MatchesPattern(urlstring.toLowerCase(), 'http:\\/\\/[\\w\\-]+(\\.[\\w\\-]+)+');
}[/CODE]I just wanted to point that out.[/QUOTE]

Oh, thanks... good find, and good troubleshooting. I like it when tech savvy folks not only report an error but take the time to dig a little deeper... it makes life easier.

I don't know if that's a fix for James since it's actually in Javascript (not even sure if that's a 3rd party script or not), but one way or another we'll check into it and hopefully just an easy regex fix.

That's a REALLY old version of the jsFormValidation ... ick. It's kind of abandonware, apparently. I'm probably better off just patching it to use (http|https) in that part of the regex. :sad:

Madpoo 2015-07-26 06:01

[QUOTE=Madpoo;406505]I'm probably better off just patching it to use (http|https) in that part of the regex. :sad:[/QUOTE]

In fact, I just did that, using (http|https)

Dubslow 2015-07-26 07:41

[QUOTE=Madpoo;406506]In fact, I just did that, using (http|https)[/QUOTE]

Why not [code]https?[/code]
?

Madpoo 2015-07-26 17:37

[QUOTE=Dubslow;406510]Why not [code]https?[/code]
?[/QUOTE]

I guess that would've worked as well. Oh well. :smile:


All times are UTC. The time now is 20:31.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.