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

IX: avoid htmlescaping in json encoding for native ad markup #1944

Merged
merged 1 commit into from
Aug 4, 2021

Conversation

mlb7687
Copy link
Contributor

@mlb7687 mlb7687 commented Aug 2, 2021

Copy of PR 1940 (#1940) which was closed due to employee departure from IX.

The last adapter change required merging eventtrackers with imptrackers in Native ad markup in the bid responses. Unfortunately go's standard json.Marshal function runs through HtmlEscape and replaces characters when encoding strings, and since native markup is sent as JSON encoded in JSON, this is causing issues in upstream servers when they receive the response.

This change uses a separate JSON encoder with HTML escaping disabled. Tests have been updated to include more complex URLs.

@mlb7687
Copy link
Contributor Author

mlb7687 commented Aug 2, 2021

@bsardo and @mansinahar who were prebid reviewers on 1940.

@grossjo for visibility as well.

Copy link
Contributor

@bsardo bsardo left a comment

Choose a reason for hiding this comment

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

LGTM

@bsardo bsardo merged commit bca2fb1 into prebid:master Aug 4, 2021
jizeyopera pushed a commit to operaads/prebid-server that referenced this pull request Oct 13, 2021
shunj-nb pushed a commit to ParticleMedia/prebid-server that referenced this pull request Nov 8, 2022
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.

None yet

4 participants