html_editor icon indicating copy to clipboard operation
html_editor copied to clipboard

Encode and decode HTML escape codes

Open xeniagda opened this issue 2 years ago • 7 comments

Attempts to solve https://github.com/lomirus/html_editor/issues/9

Escaping is always hard to get 100% in all edge cases. This PR should handle escapes properly inside Texts and attribute values. I'm not sure whether attribute keys can be escaped, so they aren't handled. <script> and <style> are respected in that entities inside them aren't decoded in parsing nor encoded in Htmlification. Some tests have been added.

As this is a breaking change, the version should probably be bumped to 0.6 before merging.

xeniagda avatar Apr 19 '23 12:04 xeniagda

Thanks for your work. I will probably review this PR in weekend.

As this is a breaking change, the version should probably be bumped to 0.6 before merging.

I would like to merge this PR as the last main update of 0.6 and then publish the v0.6 if nothing expected.

lomirus avatar Apr 19 '23 16:04 lomirus

:)

I'm thinking of making another PR to improve error handling in the parsing (removing anything which may panic, replacing string error messages with enums and adding source location information to some components). I think it would be nice if that could make it into the 0.6 release, but that's up to you :)

xeniagda avatar Apr 19 '23 18:04 xeniagda

Added some light documentation for the Node::Text variant reflecting this change.

xeniagda avatar Apr 19 '23 18:04 xeniagda

I'm thinking of making another PR to improve error handling in the parsing

I just published the v0.6.0 since you have made more PRs. This PR may be merged into the next version.

lomirus avatar Apr 22 '23 11:04 lomirus

Everything should be resolved.

xeniagda avatar Apr 27 '23 09:04 xeniagda

The conflicts need to be resolved.

lomirus avatar Apr 27 '23 16:04 lomirus

Can you fix the errors in the CI check?

lomirus avatar May 09 '23 14:05 lomirus