FIX: Incorrect string match

This commit is contained in:
Robin Ward
2014-01-14 15:38:12 -05:00
parent 71aed34e64
commit 9097368038
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -99,7 +99,7 @@ Discourse.URL = Em.Object.createWithMixins({
if (url && url.length) {
if (url.indexOf('/') === 0) { return true; }
if (url.indexOf(this.origin()) === 0) { return true; }
if (url.replace(/^http[^s]/, 'https').indexOf(this.origin()) === 0) { return true; }
if (url.replace(/^http/, 'https').indexOf(this.origin()) === 0) { return true; }
if (url.replace(/^https/, 'http').indexOf(this.origin()) === 0) { return true; }
}
return false;