Compare commits

...
3 Commits
Author SHA1 Message Date
Jérémy BenoistandGitHub 8ed91105ea Merge pull request #112 from j0k3r/fix/1.x/tidy-php85
Fix bad encoding for `tidy_repair_string`
2026-03-27 20:36:19 +01:00
Jeremy Benoist 952588ee1f Fix bad encoding for tidy_repair_string
Tidy on PHP 8.5 is more restrictive on what can be given as input encoding. Before, it worked as an unknown value was converted to `utf8`.
2026-03-27 20:34:45 +01:00
Jeremy Benoist e4e975db96 Add PHP 8.5 on CI 2026-03-27 20:32:42 +01:00
3 changed files with 3 additions and 3 deletions
+1 -2
View File
@@ -3,11 +3,9 @@ name: "CI"
on: on:
pull_request: pull_request:
branches: branches:
- "master"
- "1.x" - "1.x"
push: push:
branches: branches:
- "master"
- "1.x" - "1.x"
env: env:
@@ -29,6 +27,7 @@ jobs:
- "8.2" - "8.2"
- "8.3" - "8.3"
- "8.4" - "8.4"
- "8.5"
steps: steps:
- name: "Checkout" - name: "Checkout"
+1 -1
View File
@@ -118,7 +118,7 @@ class Readability implements LoggerAwareInterface
'enclose-text' => true, 'enclose-text' => true,
'merge-divs' => true, 'merge-divs' => true,
// 'merge-spans' => true, // 'merge-spans' => true,
'input-encoding' => '????', 'input-encoding' => 'utf8',
'output-encoding' => 'utf8', 'output-encoding' => 'utf8',
'hide-comments' => true, 'hide-comments' => true,
]; ];
+1
View File
@@ -17,6 +17,7 @@ class ReadabilityTest extends \PHPUnit\Framework\TestCase
public function testConstructDefault() public function testConstructDefault()
{ {
$readability = $this->getReadability(''); $readability = $this->getReadability('');
$this->assertSame('utf8', $readability->tidy_config['input-encoding']);
$this->assertNull($readability->url); $this->assertNull($readability->url);
$this->assertInstanceOf(\DOMDocument::class, $readability->dom); $this->assertInstanceOf(\DOMDocument::class, $readability->dom);