Skip to content

Commit

Permalink
checking for _blank targets should be case insensitive
Browse files Browse the repository at this point in the history
  • Loading branch information
wellingguzman committed Oct 13, 2016
1 parent 20b0e76 commit 40726a7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion app/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -552,7 +552,9 @@ require(["config", 'polyfills'], function() {
var root = location.protocol + "//" + location.host + app.root;

// Ensure the root is part of the anchor href, meaning it's relative.
if (href.prop.slice(0, root.length) === root && href.target !== '_BLANK') {
// @NOTE: We don't need to strictly check for "_blank".
// it needs to be case insensitive.
if (href.prop.slice(0, root.length) === root && href.target != '_blank') {
// Stop the default event to ensure the link will not cause a page
// refresh.
evt.preventDefault();
Expand Down

0 comments on commit 40726a7

Please sign in to comment.