Skip to content

Remove ENT_SUBSTITUTE from decode functions - #25223

Open
kamil-tekiela wants to merge 1 commit into
php:masterfrom
kamil-tekiela:fix-gh9582-decode-default-flags
Open

kamil-tekiela wants to merge 1 commit into
php:masterfrom
kamil-tekiela:fix-gh9582-decode-default-flags

Conversation

@kamil-tekiela

Copy link
Copy Markdown
Member

Fixes GH-9582

It looks like it was added by accident to decode functions when the default was changed to convert both single and double quotes.

@kocsismate kocsismate left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

Comment thread ext/standard/html.c
{
zend_string *str;
zend_long quote_style = ENT_QUOTES|ENT_SUBSTITUTE;
zend_long quote_style = ENT_QUOTES;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

question: Would it make sense to add ENT_HTML401 here as well? I know it won't make much difference in practice, but maybe it's better for understandability? (at least I had to check why it was possible to omit it from the C code)

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

htmlspecialchars_decode() ENT_SUBSTITUTE flag has no effect

2 participants