-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Some maintenance work #77
Changes from 6 commits
89f27e5
4a456a7
aea4cac
a3269c8
4b458ba
5eaf040
8c00c9d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -46,7 +46,7 @@ public function testFullPageMarkup() | |
HTML; | ||
|
||
$fixed = <<<'STRING' | ||
“Who Let the Dogs Out?” is a song written and originally recorded by Anslem Douglas (titled “Doggie”). | ||
“Who Let the Dogs Out?” is a song written and originally recorded by Anslem Douglas (titled “Doggie”). | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why does the behaviour changed here?! I don't get it :/ There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't know, encoding seems to have had numerous changes in PHP 8.1. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The new version look good to me 👍🏼 |
||
STRING; | ||
|
||
$this->assertEquals($fixed, $fixer->fix($html)); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually i'm not sure about this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes it should be
HTML-ENTITIES
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And there is no need to test if it's UTF-8.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using
mb_convert_encoding
to convert to HTML entities is deprecated in PHP 8.2 and did not function well previously : php/php-src@9308974And we don't want to ue
html_entity_decode
because it will break the fixer if the user pass something like1 > 3
or<3
.My concern was more about the fact that we set the charset to
$encoding
but then we encode the content to UTF-8. This is weird. Either we don't set the charset or we don't convert IMO.