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

.append() is not necessarily jQuery #650

Open
2 tasks
patrik-csak opened this issue Apr 7, 2021 · 0 comments
Open
2 tasks

.append() is not necessarily jQuery #650

patrik-csak opened this issue Apr 7, 2021 · 0 comments
Labels

Comments

@patrik-csak
Copy link

Bug Description

Expected behavior: No issue with using URLSearchParams.append()

Actual behavior: The following warning:

Any HTML passed to `append` gets executed. Make sure it's properly escaped.

It seems that VIPCS assumes .append() means jQuery.append()

Minimal Code Snippet

var params = new URLSearchParams();
params.append('name', 'value');

Error Code

WordPressVIPMinimum.JS.HTMLExecutingFunctions.append

Environment

Question Answer
PHP version 7.4.16
PHP_CodeSniffer version 3.5.8
VIPCS version 2.0.0

Tested Against master branch?

  • I have verified the issue still exists in the master branch of VIPCS.
  • I have verified the issue still exists in the develop branch of VIPCS.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants