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

Malformed JSON using template transformer. #172

Open
rubenbaraut opened this issue Dec 4, 2023 · 0 comments
Open

Malformed JSON using template transformer. #172

rubenbaraut opened this issue Dec 4, 2023 · 0 comments

Comments

@rubenbaraut
Copy link

rubenbaraut commented Dec 4, 2023

Issue Description

Malformed JSON using template transformer.

If the response body from the internal service is like

body: "onclick=\"require("IntlUtils").setCookieLocale("ar_AR", "en_US", "https:\\/\\/ar-ar.facebook.com\\/", "www_list_selector", 3);"

The transformation plugin is encoding the htmlentities resulting in non scaped quotes

onclick=\"require("IntlUtils").setCookieLocale("es_LA", "en_US", "https:\\/\\/es-la.facebook.com\\/", "www_list_selector", 0); return false;

So is changing the """ into quotes , and then the returning json response is invalid

Expected Behavior

The expected behavior is that the htmlentites should be returned without any transformation

"onclick=\"require("IntlUtils").setCookieLocale("ar_AR", "en_US", "https:\\/\\/ar-ar.facebook.com\\/", "www_list_selector", 3);"

Checklist

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

1 participant