Fix two bugs found by @TiuTalk
* When redirecting internal links, double-check that they actually are internal before doing so. * Avoid double-adding items to the /browse mod list
This commit is contained in:
@@ -63,6 +63,9 @@ module.exports = class BaseController extends Backbone.View
|
||||
href = $(event.target).attr 'href'
|
||||
href ?= $(event.currentTarget).attr 'href'
|
||||
logger.info "Re-routing link to internal navigation: #{href}"
|
||||
if href? and href.match /^http/
|
||||
window.location.href = href
|
||||
|
||||
router.navigate href, trigger:true
|
||||
|
||||
show: (args...)->
|
||||
|
||||
Reference in New Issue
Block a user