mirror of
https://github.com/FreshRSS/FreshRSS.git
synced 2026-12-02 13:32:43 -05:00
Currently, SimplePie uses legacy DOMDocument parsing, which outputs potentially problematic HTML, not correctly sanitised.
This breaks the assumption that one can use something like `<div><!-- some HTML sanitized from SimplePie --></div>`.
```
--- Expected
+++ Actual
@@ @@
'<ul>
- <li><div></div></li>
+ <li><div>
<li>Item</li>
-</ul>'
+</div></li></ul>'
```
When shown in a compliant Web browser, several tags will be wrongly closed, breaking the layout of the client.
This PR patches SimplePie to use the modern parser and code syntax, while maintaining a best-effort polyfill for legacy PHP versions < 8.4.
Depends on:
SimplePie: Upgrade to PHPStan 2
* https://github.com/FreshRSS/simplepie/pull/97
* https://github.com/simplepie/simplepie/pull/939
* https://github.com/simplepie/simplepie/pull/1019
SimplePie: Use PHP 8.4+ \Dom classes and functions
* https://github.com/FreshRSS/simplepie/pull/98
* https://github.com/simplepie/simplepie/issues/1021
SimplePie: Add unit test for HTML5 sanitizing compliance
* https://github.com/simplepie/simplepie/pull/1022
SimplePie: Remove obsolete xml_is_sane and XMLReader fallback
* https://github.com/simplepie/simplepie/pull/1023
CssXPath: Add support for case insensitivity
* https://github.com/phpgt/CssXPath/pull/256
fix https://github.com/FreshRSS/FreshRSS/issues/5201
fix https://github.com/FreshRSS/FreshRSS/issues/6830
fix https://github.com/FreshRSS/FreshRSS/issues/6831
~5% faster for HTML sanitising.
Remove SimpleXML. Remove XMLReader.
89 lines
2.2 KiB
JSON
89 lines
2.2 KiB
JSON
{
|
|
"name": "freshrss.org/freshrss",
|
|
"description": "A free, self-hostable aggregator",
|
|
"type": "project",
|
|
"homepage": "https://freshrss.org/",
|
|
"license": "AGPL-3.0",
|
|
"support": {
|
|
"docs": "https://freshrss.github.io/FreshRSS/",
|
|
"issues": "https://github.com/FreshRSS/FreshRSS/issues",
|
|
"source": "https://github.com/FreshRSS/FreshRSS/"
|
|
},
|
|
"keywords": [
|
|
"news",
|
|
"aggregator",
|
|
"RSS",
|
|
"Atom",
|
|
"WebSub"
|
|
],
|
|
"require": {
|
|
"php": ">=8.2",
|
|
"ext-ctype": "*",
|
|
"ext-curl": "*",
|
|
"ext-dom": "*",
|
|
"ext-fileinfo": "*",
|
|
"ext-gmp": "*",
|
|
"ext-intl": "*",
|
|
"ext-json": "*",
|
|
"ext-libxml": "*",
|
|
"ext-mbstring": "*",
|
|
"ext-openssl": "*",
|
|
"ext-pcre": "*",
|
|
"ext-pdo": "*",
|
|
"ext-pdo_sqlite": "*",
|
|
"ext-session": "*",
|
|
"ext-xml": "*",
|
|
"ext-zend-opcache": "*",
|
|
"ext-zip": "*",
|
|
"ext-zlib": "*"
|
|
},
|
|
"suggest": {
|
|
"ext-iconv": "*",
|
|
"ext-pdo_mysql": "*",
|
|
"ext-pdo_pgsql": "*"
|
|
},
|
|
"config": {
|
|
"allow-plugins": {
|
|
"phpstan/extension-installer": false
|
|
},
|
|
"platform": {
|
|
"php": "8.2"
|
|
}
|
|
},
|
|
"require-dev": {
|
|
"php": ">=8.2",
|
|
"ext-phar": "*",
|
|
"ext-simplexml": "*",
|
|
"ext-tokenizer": "*",
|
|
"ext-xmlwriter": "*",
|
|
"phpstan/phpstan": "^2.2",
|
|
"phpstan/phpstan-deprecation-rules": "^2.0",
|
|
"phpstan/phpstan-phpunit": "^2.0",
|
|
"phpstan/phpstan-strict-rules": "^2.0",
|
|
"phpunit/phpunit": "^11",
|
|
"squizlabs/php_codesniffer": "^4.0"
|
|
},
|
|
"scripts": {
|
|
"php-lint": "find . -type d -name 'vendor' -prune -o -name '*.php' -print0 | xargs -0 -n1 -P4 php -l 1>/dev/null",
|
|
"phtml-lint": "find . -type d -name 'vendor' -prune -o -name '*.phtml' -print0 | xargs -0 -n1 -P4 php -l 1>/dev/null",
|
|
"phpcs": "phpcs . -s",
|
|
"phpcbf": "phpcbf . -p -s",
|
|
"phpstan": "phpstan analyse --memory-limit 512M .",
|
|
"phpstan-next": "phpstan analyse --memory-limit 512M -c phpstan-next.neon .",
|
|
"phpunit": "phpunit --do-not-fail-on-skipped",
|
|
"compile-plurals": "php cli/compile.plurals.php --all",
|
|
"translations": "cli/manipulate.translation.php --action format && php cli/compile.plurals.php --all && cli/check.translation.php --generate-readme",
|
|
"test": [
|
|
"@php-lint",
|
|
"@phtml-lint",
|
|
"@phpunit",
|
|
"@phpcs",
|
|
"@phpstan"
|
|
],
|
|
"fix": [
|
|
"@translations",
|
|
"@phpcbf"
|
|
]
|
|
}
|
|
}
|