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

Remove obsolete unescaping on JSON output #8393

Merged
merged 1 commit into from Oct 9, 2017

Conversation

Projects
None yet
4 participants
@eternoendless
Member

eternoendless commented Oct 4, 2017

Questions Answers
Branch? develop
Description? The WS JSON output was unescaped using an obsolete workaround, probably because in PHP < 5.4 it was impossible to send UTF-8 characters without them being escaped. Moreover, this workaround wasn't working for utf8mb4 characters such as emoji. Since PHP 5.4 it's possible to perform JSON encoding without escaping UTF8 characters natively, so this PR changes the workaround for the native solution, which as an added bonus also works for emojis. You can learn more in this discussion.
Type? bug fix
Category? WS
BC breaks? no
Deprecations? no
Fixed ticket?
How to test? Use the web service to retrieve any element containing an emoji

Kudos to @vavrecan for reporting this issue!


This change is Reviewable

@eternoendless eternoendless added this to the 1.7.3.0 milestone Oct 4, 2017

@codacy-bot

This comment has been minimized.

Show comment
Hide comment
@codacy-bot

codacy-bot Oct 4, 2017

Codacy Here is an overview of what got changed by this pull request:

Complexity increasing per file
==============================
- classes/webservice/WebserviceOutputJSON.php  1
         

See the complete overview on Codacy

codacy-bot commented Oct 4, 2017

Codacy Here is an overview of what got changed by this pull request:

Complexity increasing per file
==============================
- classes/webservice/WebserviceOutputJSON.php  1
         

See the complete overview on Codacy

@LittleBigDev

This comment has been minimized.

Show comment
Hide comment
@LittleBigDev

LittleBigDev Oct 9, 2017

Contributor

Reviewed 1 of 1 files at r1.
Review status: all files reviewed at latest revision, all discussions resolved.


Comments from Reviewable

Contributor

LittleBigDev commented Oct 9, 2017

Reviewed 1 of 1 files at r1.
Review status: all files reviewed at latest revision, all discussions resolved.


Comments from Reviewable

@Quetzacoalt91 Quetzacoalt91 merged commit 4ba5e1b into PrestaShop:develop Oct 9, 2017

2 checks passed

codacy/pr Good work! A positive pull request.
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@eternoendless eternoendless deleted the eternoendless:fix-json-unicode branch Nov 17, 2017

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