From: Justin Date: Thu, 24 Jul 2014 21:19:21 +0000 (+0200) Subject: Fix #313. Repair broken image extension detection regex. X-Git-Tag: v0.9.99~1924^2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=eafa365453b6756272ced185f5d8060fb6bc5f07;p=gitea.git Fix #313. Repair broken image extension detection regex. --- diff --git a/public/js/app.js b/public/js/app.js index 7ffcbd4a3e..01341d7567 100644 --- a/public/js/app.js +++ b/public/js/app.js @@ -536,7 +536,7 @@ function initIssue() { var over = function() { var $this = $(this); - if ($this.text().match(/\.(png|jpg|jpeg|gif)$/i) == false) { + if ((/\.(png|jpg|jpeg|gif)$/i).test($this.text()) == false) { return; }