Skip to content

fix: undefined array key warning#419

Merged
ezyang merged 1 commit intoezyang:masterfrom
olekans:fix-undefined-array-key-warning
Oct 31, 2024
Merged

fix: undefined array key warning#419
ezyang merged 1 commit intoezyang:masterfrom
olekans:fix-undefined-array-key-warning

Conversation

@olekans
Copy link
Copy Markdown
Contributor

@olekans olekans commented Oct 30, 2024

Hello 👋

The following code causes the warning “Undefined array key 2”

$html = "/<style>{src:'<style/onload=this.onload=confirm(1)>'/</style>';";

$purifier = new \HTMLPurifier();

$purifier->purify($html);

This also solves the problem reported here #413

@olekans olekans changed the title Fix undefined array key warning fix: undefined array key warning Oct 30, 2024
Copy link
Copy Markdown
Owner

@ezyang ezyang left a comment

Choose a reason for hiding this comment

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

lol they killed @ operator

@ezyang ezyang merged commit 01be377 into ezyang:master Oct 31, 2024
@olekans olekans deleted the fix-undefined-array-key-warning branch October 31, 2024 08:17
@olekans
Copy link
Copy Markdown
Contributor Author

olekans commented Oct 31, 2024

@ezyang When do you plan to make the release? I need to have this change in the release, is there a way to make it? :)

@ezyang
Copy link
Copy Markdown
Owner

ezyang commented Nov 1, 2024

i forgot how to make a new release again lol

github-actions Bot pushed a commit that referenced this pull request Nov 1, 2024
# [4.18.0](v4.17.0...v4.18.0) (2024-11-01)

### Bug Fixes

* Adjust Core.AllowHostnameUnderscore to consider that "_" is defined as Unreserved Characters in RFC 3986 ([#406](#406)) ([d9fbef8](d9fbef8))
* Avoid a deprecated error when the attribute name is numeric and DirectLex is used ([#412](#412)) ([f0fbf51](f0fbf51))
* checking that node has property name ([#399](#399)) ([9ca5a36](9ca5a36))
* Ignore conditional comments ([#401](#401)) ([4828fdf](4828fdf))
* Support PHP 8.4 ([#396](#396)) ([92da247](92da247))
* undefined array key warning ([#419](#419)) ([01be377](01be377))

### Features

* Add allowfullscreen attr for iframe ([#411](#411)) ([70754a2](70754a2))
* add directive for removing blank nodes ([#404](#404)) ([c9d60c9](c9d60c9))
* Add support for CSS aspect-ratio ([#408](#408)) ([93bee73](93bee73))
* Allow universal CSS values for all properties ([#410](#410)) ([9723267](9723267))
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Nov 1, 2024

🎉 This PR is included in version 4.18.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants