http://www.mediawiki.org/wiki/Special:Code/MediaWiki/84640

Revision: 84640
Author:   yaron
Date:     2011-03-23 21:59:47 +0000 (Wed, 23 Mar 2011)
Log Message:
-----------
Added "news" as another allowed prefix for URLs

Modified Paths:
--------------
    trunk/extensions/SemanticForms/libs/SemanticForms.js

Modified: trunk/extensions/SemanticForms/libs/SemanticForms.js
===================================================================
--- trunk/extensions/SemanticForms/libs/SemanticForms.js        2011-03-23 
21:58:41 UTC (rev 84639)
+++ trunk/extensions/SemanticForms/libs/SemanticForms.js        2011-03-23 
21:59:47 UTC (rev 84640)
@@ -483,7 +483,7 @@
 jQuery.fn.validateURLField = function() {
        var fieldVal = this.find("input").val();
        // code borrowed from http://snippets.dzone.com/posts/show/452
-       var url_regexp = 
/(ftp|http|https|rtsp):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/;
+       var url_regexp = 
/(ftp|http|https|rtsp|news):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/;
        if (fieldVal == "" || url_regexp.test(fieldVal)) {
                return true;
        } else {


_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to