mirror of
https://github.com/discourse/discourse.git
synced 2025-01-19 11:22:47 +08:00
FIX: Allow users to create protocol relative URLs in posts.
This commit is contained in:
parent
092f7510b4
commit
d31996eaca
|
@ -59,6 +59,12 @@ Discourse.URL = Em.Object.createWithMixins({
|
|||
return;
|
||||
}
|
||||
|
||||
// Protocol relative URLs
|
||||
if (path.indexOf('//') === 0) {
|
||||
document.location = path;
|
||||
return;
|
||||
}
|
||||
|
||||
// Scroll to the same page, differnt anchor
|
||||
if (path.indexOf('#') === 0) {
|
||||
var $elem = $(path);
|
||||
|
|
Loading…
Reference in New Issue
Block a user