Skip to content
This repository has been archived by the owner on Apr 10, 2023. It is now read-only.

Blank Lines in HTML Filtering Settings "Custom attributes" Breaks TinyMCE #161

Open
flipmcf opened this issue Oct 29, 2020 · 0 comments
Open

Comments

@flipmcf
Copy link

flipmcf commented Oct 29, 2020

It's a pretty cool way to ruin someone's plone installation!
go to @@filter-controlpanel and add two blank lines to "Custom Attributes" and watch mosaic and tinyMCE break.

specifically for the mosaic editor, you get Failed while initializing 'layout' pattern. TypeError: i[2] is undefined in your javascript console.

The effect is deep inside TinyMCE javascript where there aren't any matches to a regexp, yet the javascript still tries to access and use 'matches[2]' and gets an Type Error: undefined. The javascript should be fixed, it's where the edge case should be handled, but it's easier just to fix it in Plone I would imagine.

Simply filtering out empty strings should fix this simple issue.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant