- 🇩🇪Germany Anybody Porta Westfalica
Just FYI and as another example: For a block containing Shopify Buy Buttons (JavaScript) with only "Correct faulty and chopped off HTML" filter removed the closing elements from the code: https://github.com/Shopify/buy-button-js/issues/806
This was quite tricky ;DThe expected and correct result would be to keep the closing brackets from the JavaScript. Removing them breaks the code here.
Not sure if this edge-case is relevant, but I thought it would make sense to let you know. Especially because the reason isn't easy to find. - 🇨🇦Canada joseph.olstad
@Anybody , comment #31 good to know however that's out of the scope of this patch.
- 🇩🇪Germany Anybody Porta Westfalica
@joseph.olstad: Sorry, reading my comment, I guess I commented into the wrong issue -.- SORRY!
I'll have a look, if I can find the correct one, and otherwise create one. Seems to be a similar issue with the "Correct faulty and chopped off HTML" filter. - 🇨🇦Canada joseph.olstad
@Anybody, I did some related filter work last night and published a new module that cleans up some other unrelated ckeditor mess.
We're using a javascript library that provides charts however the charts crash if the expected empty table descriptor
<td>
element contains the annoying
that ckeditor insists on inserting.So for some reason the above patches no longer seem to be working the way they did at one point , now I'm testing Drupal 10.0.9 and I ended up using a text filter plugin.
It's super easy to create a text filter plugin, I simply used drush gen.
drush gen module;
(create new module, or not)
drush gen plugin:filter
add the filter to an existing module (the one you just created with drush gen module or another existing module)The example plugin provides a configuration option, I've implemented this in a very simple module called wxt_chart_stability
Enable this new plugin (whatever you called it, it'll have a checkbox, enable that)
To ensure that this new plugin has the final word, I had to drag up the weight of the plugin to the top and save it.
We need to redo the above patch that cleans up the source and track elements with regular expression code similar to the patch code and turn it into a contrib module instead.
With that said, I don't know how a module as popular as ckeditor does such silly annoying things with nbsp and like you say other filters could be complicating matters.
- 🇨🇦Canada joseph.olstad
@Anybody, you might be overworked lol needing some extra sleep, check that link in your last comment. :)
- 🇩🇪Germany Anybody Porta Westfalica
@joseph.olstad that's for sure the case ;D Thanks, I corrected the link and should get some sleep now ....... ;)
- 🇧🇪Belgium wim leers Ghent 🇧🇪🇪🇺
🐛 Upgrade filter system to HTML5 Fixed landed. I'm hoping this will now just need test coverage to prove it works correctly?