kitconcept / volto-heading-block

MIT License
2 stars 1 forks source link

Fix decoding of html entities (#1361) #10

Closed reekitconcept closed 1 year ago

reekitconcept commented 1 year ago

Previously   and html tags were handled, however we need an universal conversion of all html entities.

reekitconcept commented 1 year ago

Note: this has to be tested carefully, especially with regards to how it handles pastes.

I notice that there has been a previous fix for pasting so it should be re-validated. I notice that if I paste an html entity such as "&" it will be now decoded back to plaintext "&" which might be undesirable but probably unavoidable if we support pasting html content.

However without this if we directly type (not even paste) &, it will cause & to save so we need to backconvert. Original issue https://gitlab.dlr.de/internet-cms/cms-plone/dlr-internet/-/issues/1361

reekitconcept commented 1 year ago

LGTM, although I'd like to have acceptance tests around if possible.

I agree that would be useful. - Can we release without? I have a high priority task which I cannot delay, so it's unlikely for me to land this today.

sneridagh commented 1 year ago

@ThomasKindermann maybe you can take a look at the cypress tests? thx!

sneridagh commented 1 year ago

@ThomasKindermann I fixed the test fixtures. Just to be clear, I'd like to have more accurate acceptance test for the use case that we are fixing. Thanks!

ThomasKindermann commented 1 year ago

@sneridagh Ill take a look at the tests