mirror of
https://github.com/codeninjasllc/discourse.git
synced 2025-03-29 08:09:55 -04:00
Consider URLs starting with # as internal
This commit is contained in:
parent
32000228e6
commit
96f97d9d4c
1 changed files with 1 additions and 0 deletions
|
@ -129,6 +129,7 @@ Discourse.URL = Em.Object.createWithMixins({
|
|||
**/
|
||||
isInternal: function(url) {
|
||||
if (url && url.length) {
|
||||
if (url.indexOf('#') === 0) { return true; }
|
||||
if (url.indexOf('/') === 0) { return true; }
|
||||
if (url.indexOf(this.origin()) === 0) { return true; }
|
||||
if (url.replace(/^http/, 'https').indexOf(this.origin()) === 0) { return true; }
|
||||
|
|
Loading…
Add table
Reference in a new issue