summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoralec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c>2008-07-28 06:43:02 +0000
committeralec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c>2008-07-28 06:43:02 +0000
commit2da193fec32393fc10ea2b66bc979da88e4f3a46 (patch)
tree1c849c84a018f977dc1f6306196006c2e78d1cba
parent002265f28489df68f6ba2289bc82cc12dd832b2f (diff)
#1485230: allow only images (by filename extension) in tinyMCE's images selector
git-svn-id: https://svn.roundcube.net/trunk@1612 208e9e7b-5314-0410-a742-e7e81cd9613c
-rw-r--r--roundcubemail/program/js/editor_images.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/roundcubemail/program/js/editor_images.js b/roundcubemail/program/js/editor_images.js
index 373b44e3d..36fc1ab59 100644
--- a/roundcubemail/program/js/editor_images.js
+++ b/roundcubemail/program/js/editor_images.js
@@ -15,6 +15,8 @@ if (rc_client.gui_objects.attachmentlist)
fname = liElem.childNodes[j].nodeValue;
}
}
- tinyMCEImageList.push([fname, rc_client.env.comm_path+'&_action=display-attachment&_file='+attachElems[i].id]);
+
+ if (fname.match(/\.(bmp|gif|png|jpg|jpeg)$/))
+ tinyMCEImageList.push([fname, rc_client.env.comm_path+'&_action=display-attachment&_file='+attachElems[i].id]);
}
};