Skip to content

Commit

Permalink
corrected invalid regex for determining image type
Browse files Browse the repository at this point in the history
  • Loading branch information
jhstatewide committed Jun 18, 2014
1 parent ef85cd6 commit 8fbf620
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions WPide.php
Expand Up @@ -1033,8 +1033,8 @@ function the_filetree() {
jQuery(".wpide_tab[sessionrel='"+ jQuery(".wpide_tab[rel='"+file+"']").attr("sessionrel") +"']").click();//focus the already open tab
}else{ //open file

var image_patern =new RegExp("(\.jpg|\.gif|\.png|\.bmp)");
if ( image_patern.test(file) ){
var image_pattern = new RegExp("(\\.jpg$|\\.gif$|\\.png$|\\.bmp$)");
if ( image_pattern.test(file) ){
//it's an image so open it for editing

//using modal+iframe
Expand Down

0 comments on commit 8fbf620

Please sign in to comment.