diff options
| author | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2008-07-28 06:43:02 +0000 |
|---|---|---|
| committer | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2008-07-28 06:43:02 +0000 |
| commit | 2da193fec32393fc10ea2b66bc979da88e4f3a46 (patch) | |
| tree | 1c849c84a018f977dc1f6306196006c2e78d1cba /roundcubemail/program/js | |
| parent | 002265f28489df68f6ba2289bc82cc12dd832b2f (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
Diffstat (limited to 'roundcubemail/program/js')
| -rw-r--r-- | roundcubemail/program/js/editor_images.js | 4 |
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]); } }; |
