PHP 7.4: new NewStripTagsAllowableTagsArray sniff by jrfnl · Pull Request #867 · PHPCompatibility/PHPCompatibility

Skip to content

Navigation Menu

Sign in

Appearance settings

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Appearance settings

Conversation

@jrfnl

Copy link Copy Markdown

Member

@jrfnl jrfnl commented

Aug 20, 2019

strip_tags() now also accepts an array of allowed tags: Instead of
strip_tags($str, '<a><p>') you can now write strip_tags($str, ['a', 'p']).

Refs:

Includes unit tests.

Related to #808

@jrfnl jrfnl added this to the 9.3.0 milestone

Aug 20, 2019

@jrfnl jrfnl requested a review from wimg

August 20, 2019 05:36

@jrfnl jrfnl force-pushed the php-7.4/new-striptags-allowabletags-array-sniff branch 2 times, most recently from f45dbad to 19a66bb Compare

August 20, 2019 14:09
> `strip_tags()` now also accepts an array of allowed tags: Instead of
`strip_tags($str, '<a><p>')` you can now write `strip_tags($str, ['a', 'p'])`.

Refs:
* https://github.com/php/php-src/blob/3775d47eee38f3b34f800a0b23f840ec7a94e4c7/UPGRADING#L301-L303
* php/php-src@b1e9c73

Includes unit tests.

@jrfnl jrfnl force-pushed the php-7.4/new-striptags-allowabletags-array-sniff branch from 19a66bb to 225268f Compare

August 21, 2019 09:42

@wimg wimg merged commit 3f01148 into master

Aug 28, 2019

@delete-merged-branch delete-merged-branch bot deleted the php-7.4/new-striptags-allowabletags-array-sniff branch

August 28, 2019 14:48

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

Reviewers

@wimg wimg wimg approved these changes

Assignees

No one assigned

Projects

None yet

Milestone

9.3.0

Development

Successfully merging this pull request may close these issues.

2 participants

@jrfnl @wimg