summaryrefslogtreecommitdiff
path: root/program
diff options
context:
space:
mode:
authoralecpl <alec@alec.pl>2008-07-28 06:43:02 +0000
committeralecpl <alec@alec.pl>2008-07-28 06:43:02 +0000
commit3ac95d5a673db544d7ceeaa9e5fca766cb738120 (patch)
tree1ece2f784c3c3ea0f42a63e0bd53e1173c083ca6 /program
parent5f0724f8adca9b545b89e71287f8276e86881868 (diff)
#1485230: allow only images (by filename extension) in tinyMCE's images selector
Diffstat (limited to 'program')
-rw-r--r--program/js/editor_images.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/program/js/editor_images.js b/program/js/editor_images.js
index 373b44e3d..36fc1ab59 100644
--- a/program/js/editor_images.js
+++ b/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]);
}
};