Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cleanup deprecated Line->input #64

Merged
merged 11 commits into from Jul 22, 2022
Merged

Conversation

lode
Copy link
Collaborator

@lode lode commented Jul 21, 2022

This does a cleanup of the deprecation mark on Line->input.

There's still calls to that property for different reasons I think:

I haven't dived into the tests yet, however all tests are green. That also worries me a little though. While making and debugging I never got failed tests. For example switching Script to use getInput instead, no test breaks. So we probably need to add some tests to make sure this doesn't break anything.

  • investigate and make some tests

@nadar
Copy link
Owner

nadar commented Jul 21, 2022

I did a quick review. This looks good to me.

That also worries me a little though. While making and debugging I never got failed tests. For example switching Script to use getInput instead, no test breaks. So we probably need to add some tests to make sure this doesn't break anything.

Yes, maybe we have to add more tests. Regarding getUnsafeInput in code block, i guess this will explain that behavior:

Note it could be escaped if a previous inline listener updated the input value

@lode lode marked this pull request as ready for review July 21, 2022 19:52
@lode
Copy link
Collaborator Author

lode commented Jul 21, 2022

I did a quick review. This looks good to me.

👍

Yes, maybe we have to add more tests.

I verified all listener changes with new tests. Feels better :)

Regarding getUnsafeInput in code block, i guess this will explain that behavior:

Note it could be escaped if a previous inline listener updated the input value

I was actually wrong about the script listener. I thought it was the <script> element, but it is about <sup>/<sub>. They should actually be escaped.

The unsafe is for custom listeners where the editor-user can add html which should be executed as html in the reader-user's browser. But we don't have such listener built-in anyway.


I'd be comfortable about merging this.

@codeclimate
Copy link

codeclimate bot commented Jul 22, 2022

Code Climate has analyzed commit 4f3834c and detected 0 issues on this pull request.

The test coverage on the diff in this pull request is 100.0% (50% is the threshold).

This pull request will bring the total coverage in the repository to 98.0% (0.0% change).

View more on Code Climate.

@nadar nadar merged commit cf06628 into master Jul 22, 2022
@nadar nadar deleted the cleanup-deprecated-unescaped-input branch April 11, 2024 09:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants