TinyMCE bug allows user to break field entry

There seems to be no way to prevent a paste into the field, which allows the users to paste a picture which is too large for the field, which basically makes the field uneditable from there on in.

To reproduce

  • Create a text field for normal editing/formatting
  • Paste the field with a picture.
  • If the picture is too big, it pastes as a blob, which is too big for the text field
  • The field can no longer be accessed and is effectively stuck unless you go into PHPMyAdmin and delete the corrupted blob.

You can avoid this where needed by using a longtext field, but I DO NOT want to make every field which needs a bit of user formatting longtext!
On the other hand, using a multi-line text entry instead means the user needs to know basic HTML to give any formatting

Further investigation on this would imply that you need to be able to prevent paste picture on some fields. This is just a tinyMCE command on the init function, but that would need to be an option setup by Scriptcase alongside the Editor HTML settings as it has to happen when the editor is initialised.

See this related thread: