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

Catching when wp_json_encode() would be more applicable #175

Closed
gudmdharalds opened this issue Apr 18, 2018 · 1 comment
Closed

Catching when wp_json_encode() would be more applicable #175

gudmdharalds opened this issue Apr 18, 2018 · 1 comment

Comments

@gudmdharalds
Copy link
Contributor

In some instances using wp_json_encode() is more applicable than esc_attr() and esc_url(), for instance here:

<script type='text/javascript'>

somefunction('somefuncprefix_<?php echo esc_attr( $myid ); ?>_div').setup({
   file: '<?php echo esc_url( $myurl ); ?>',
})

</script>

The ruleset should catch these.

@rebeccahum
Copy link
Contributor

rebeccahum commented Oct 26, 2018

Related: #113 -- Closing in favour of it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants