Active
Project:
Wysiwyg cleaner
Version:
6.x-1.2
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
15 Oct 2009 at 16:07 UTC
Updated:
15 Oct 2009 at 17:24 UTC
Using tinymce in firefox, I just noticed if you add a preset rule to remove or change all table related tags then it affects the tinymce toolbar and breaks it.
Somehow the javascript function needs to be more selective in how it processes the cleaning.
Thanks
Ben
Comments
Comment #1
jide commentedDid you use multiple selectors, like "table, tr, td" ?
In this case, i know where the bug comes from, and it is not an easy one.
A simple solution right now is not to use multiple selectors and use several rules instead.
I ran into problems using contexts with complex jQuery selectors like "li[attr*=value]".
As a workaround, instead of doing :
$(rule, element)We get the element through :
$(element.selector+' '+rule)(That's in wysiwyg_cleaner.api.js, line 55)
That's quite an issue and has side effects, but I could not find another way to make those complex filters work. I spent hours trying to figure out why it does not work and could not find a clue, so my conclusion is that there is a bug in jQuery when combining complex filters, DOM manipulation and contexts.
The options we have are :
- Wait and see if future versions of jQuery are not affected with this bug anymore.
- Drop support for complex filters (that would be sad).
- Keep the workaround but enhance it to take care of multiple selectors.
- Try to fix the bug.
Comment #2
smoothify commentedThanks for the quick reply and the suggestion
I was using multiple selectors - so switching to single ones does workaround the issue.
For me personally, the workaround is fine - and I do like the ability to have complex filters.
Ben
Comment #3
jide commentedOkay great. I leave the issue open since this really is the biggest issue with the module and I hope i will fix it some day.