Replaced some html_entity_decode to engine's built-in function (#1733)

* Replaced some html_entity_decode to engine's built-in function

* Updated
This commit is contained in:
Roman Kelesidis 2025-01-05 00:19:14 +07:00 committed by GitHub
commit 616a19351f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 4 additions and 3 deletions

View file

@ -10,6 +10,7 @@
- Added `m4a` extension support in M3U playback [\#1724](https://github.com/torrentpier/torrentpier/pull/1724) ([belomaxorka](https://github.com/belomaxorka))
- Created `VersionHelper.php` [\#1731](https://github.com/torrentpier/torrentpier/pull/1731) ([belomaxorka](https://github.com/belomaxorka))
- Drop Ocelot announcer support 🫡 [\#1727](https://github.com/torrentpier/torrentpier/pull/1727) ([belomaxorka](https://github.com/belomaxorka))
- Replaced some `html_entity_decode` to engine's built-in function [\#1733](https://github.com/torrentpier/torrentpier/pull/1733) ([belomaxorka](https://github.com/belomaxorka))
- Show torrent's announcers list in `filelist.php` page [\#1708](https://github.com/torrentpier/torrentpier/pull/1708) ([belomaxorka](https://github.com/belomaxorka))
- [PHP 8.4] Fixed some deprecations [\#1718](https://github.com/torrentpier/torrentpier/pull/1718) ([belomaxorka](https://github.com/belomaxorka))
- [Configurable] Show magnet-links for guests [\#1712](https://github.com/torrentpier/torrentpier/pull/1712) ([belomaxorka](https://github.com/belomaxorka))

View file

@ -361,10 +361,10 @@ function commify(?float $num, int $decimals = 0, ?string $decimal_separator = '.
*
* @param string $string
* @param int $flags
* @param string|null $encoding
* @param string $encoding
* @return string
*/
function html_ent_decode(string $string, int $flags = ENT_QUOTES, ?string $encoding = 'UTF-8'): string
function html_ent_decode(string $string, int $flags = ENT_QUOTES, string $encoding = 'UTF-8'): string
{
return html_entity_decode($string, $flags, $encoding);
}

View file

@ -644,7 +644,7 @@ class Torrent
// Send torrent
$output = Bencode::encode($tor);
$dl_fname = html_entity_decode($topic_title, ENT_QUOTES, 'UTF-8') . ' [' . $bb_cfg['server_name'] . '-' . $topic_id . ']' . '.' . TORRENT_EXT;
$dl_fname = html_ent_decode($topic_title) . ' [' . $bb_cfg['server_name'] . '-' . $topic_id . ']' . '.' . TORRENT_EXT;
if (!empty($_COOKIE['explain'])) {
$out = "attach path: $filename<br /><br />";