FIX: Allow users to create protocol relative URLs in posts.

This commit is contained in:
Robin Ward 2014-05-12 16:30:00 -04:00
parent 092f7510b4
commit d31996eaca

View File

@ -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);