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

JS data is escaped twice #12

Open
pdufour opened this issue Dec 5, 2014 · 3 comments
Open

JS data is escaped twice #12

pdufour opened this issue Dec 5, 2014 · 3 comments

Comments

@pdufour
Copy link

pdufour commented Dec 5, 2014

Single quotes should be displayed as \', but instead it adds two slashes.

Example: http://www.brit.co/baby-names/

<script type='text/javascript'>
    var sranalytics = {
        "version": "0.1.3",
        ....
        "authors": ["Annie D\\'Souza"]
    };
</script>
@pdufour
Copy link
Author

pdufour commented Dec 5, 2014

I'm pretty sure you can remove all the esc_js calls here: https://github.com/simplereach/sranalytics_wordpress/blob/master/sranalytics.php#L162 since the data is already being json_encoded.

@pdufour
Copy link
Author

pdufour commented Jan 6, 2015

bump

@andremalan
Copy link
Contributor

Hey, we added the extra escapes based on feedback from WordPress during their WordPress.com VIP approval process.

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

No branches or pull requests

2 participants