Support protocol-relative URLs in the whitelist

Bug: 61556
Change-Id: Icac9f8357ac08db0cf2f5be562e9ed1f8f13eba3
This commit is contained in:
Jackmcbarn 2014-10-22 10:10:37 -04:00
parent e9f5984153
commit 333e065361

View file

@ -403,7 +403,7 @@ class SimpleCaptcha {
// return '/' . str_replace( '/', '\/', preg_replace('|\\\*/|', '/', $regex) ) . '/Si';
$regexes = array();
$regexStart = array(
'normal' => '/^https?:\/\/+[a-z0-9_\-.]*(?:',
'normal' => '/^(?:https?:)?\/\/+[a-z0-9_\-.]*(?:',
'noprotocol' => '/^(?:',
);
$regexEnd = array(