diff --git a/addons/autolink/autolink.js b/addons/autolink/autolink.js index c118be337..ffa687b60 100644 --- a/addons/autolink/autolink.js +++ b/addons/autolink/autolink.js @@ -92,10 +92,15 @@ }); xe.registerPlugin(new AutoLink()); - + $(document).on('click', '.xe_content a', function() { - if (!$(this).attr("target")) { - $(this).attr("target", "_blank"); + var $this = $(this); + var href = $this.attr('href'); + if(!href || /^(?:javascript|mailto):/.test(href)) { + return; + } + if (!$this.attr("target")) { + $this.attr("target", "_blank"); } });