On 9/26/12 5:16 AM, Kees Hink wrote:
These answers were very helpful, thanks.

In our richtexteditor.js, we now added this setup parameter:

    params = $.extend(
      {
        // ...
        setup : function(ed) {
           ed.onSaveContent.add(function(ed, o) {
               // find all img's with src=data:image
               var pattern=/\<img[^>]*src=[^>]*data:image[^>]*\/\>/g;
               var filtered=o.content.replace(pattern, '');
               o.content=filtered;
           });
        },
    // ...
      },

That's all we need for now to prevent normal users doing this.

Any reason we shouldn't add this to Products.TinyMCE?
David

_______________________________________________
Product-Developers mailing list
[email protected]
https://lists.plone.org/mailman/listinfo/plone-product-developers

Reply via email to