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

fix(no-useless-mustaches): escape < in fixes #2389

Merged

Conversation

DMartens
Copy link
Contributor

@DMartens DMartens commented Feb 1, 2024

Fixes #2384
I looked up the parser specification for the inside tag case for potential additional cases which would differ:

  • <: already covered in the issue
  • EOF: would already be an error
  • \0: I guess/hope no one would do this but there is a difference
  • &: there are cases when combining the text with either before or after the mustache but is also highly unlikely

So this PR only adds escaping < with &lt; in the fixer.

@ota-meshi ota-meshi force-pushed the no-useless-mustaches-no-fix-for-invalid-html branch from a603614 to 808762d Compare February 2, 2024 05:32
Copy link
Member

@ota-meshi ota-meshi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for working on the issue and thank you for looking into more details!
The code looks good to me.
Could you run npm run lint:fix to format the file?

@FloEdelmann
Copy link
Member

There is still a lint error, so please run npm run lint:fix.

Copy link
Member

@FloEdelmann FloEdelmann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, thanks for researching and fixing this bug!

Copy link
Member

@ota-meshi ota-meshi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thank you!

@ota-meshi ota-meshi merged commit 33b67a4 into vuejs:master Feb 18, 2024
17 checks passed
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.

vue/no-useless-mustaches auto-fix produces invalid HTML
3 participants