From a54951380893f1729d9cc44c51da9c8de59b21bc Mon Sep 17 00:00:00 2001 From: Huhani Date: Thu, 29 Aug 2019 23:33:22 +0900 Subject: [PATCH] =?UTF-8?q?=ED=95=98=EC=9D=B4=ED=8D=BC=EB=A7=81=ED=81=AC?= =?UTF-8?q?=20href=EA=B0=92=EC=9D=B4=20javascript=EB=82=98=20mailto?= =?UTF-8?q?=EB=A1=9C=20=EC=8B=9C=EC=9E=91=EB=90=A0=20=EA=B2=BD=EC=9A=B0=20?= =?UTF-8?q?target=3D=5Fblank=20=EC=86=8D=EC=84=B1=EC=9D=84=20=EC=B6=94?= =?UTF-8?q?=EA=B0=80=ED=95=98=EC=A7=80=20=EC=95=8A=EA=B2=8C=20=EC=88=98?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- addons/autolink/autolink.js | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) 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"); } });