Skip to content

Conversation

@jrfnl
Copy link
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants