r84640 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r84639‎ | r84640 | r84641 >
Date:21:59, 23 March 2011
Author:yaron
Status:deferred
Tags:
Comment:
Added "news" as another allowed prefix for URLs
Modified paths:
  • /trunk/extensions/SemanticForms/libs/SemanticForms.js (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticForms/libs/SemanticForms.js
@@ -483,7 +483,7 @@
484484 jQuery.fn.validateURLField = function() {
485485 var fieldVal = this.find("input").val();
486486 // code borrowed from http://snippets.dzone.com/posts/show/452
487 - var url_regexp = /(ftp|http|https|rtsp):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/;
 487+ var url_regexp = /(ftp|http|https|rtsp|news):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/;
488488 if (fieldVal == "" || url_regexp.test(fieldVal)) {
489489 return true;
490490 } else {