Skip to content

Conversation

@justlevine
Copy link
Collaborator

@justlevine justlevine commented Dec 30, 2023

What does this implement/fix? Explain your changes.

This PR explicitly sets the flags used in html_entity_decode().

The reason for this change is that PHP 8.1+ changes the default flags from ENT_COMPAT to ENT_QUOTES | ENT_SUBSTITUTE | ENT_HTML401.

  1. By specifying them explicitly, we ensure uniform behavior across current (and potentially future) PHP versions.
  2. By adopting the default values from PHP 8.1 as our explicit flags, we get a minor enhancement in < PHP 8.1 versions.

Does this close any currently open issues?

Any relevant logs, error output, GraphiQL screenshots, etc?

Any other comments?

Where has this been tested?

Operating System: Ubuntu 20.04 (wsl2 + devilbox + php8.1.15)

WordPress Version: 6.4.2

@qlty-cloud-legacy
Copy link

Code Climate has analyzed commit ace37af and detected 0 issues on this pull request.

View more on Code Climate.

@justlevine justlevine added type: bug Issue that causes incorrect or unexpected behavior status: in review Awaiting review before merging or closing scope: code quality Refactoring, linting, and enforcing coding standards labels Dec 30, 2023
@justlevine justlevine requested a review from jasonbahl December 31, 2023 00:00
@coveralls
Copy link

Coverage Status

coverage: 84.792%. remained the same
when pulling ace37af on justlevine:fix/decode-more-entities
into 683352d on wp-graphql:develop.

@jasonbahl jasonbahl merged commit fbd06dd into wp-graphql:develop Jan 8, 2024
@justlevine justlevine deleted the fix/decode-more-entities branch January 8, 2024 15:37
This was referenced Jan 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

scope: code quality Refactoring, linting, and enforcing coding standards status: in review Awaiting review before merging or closing type: bug Issue that causes incorrect or unexpected behavior

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants