Fix for html entities being displayed in magnet links (#1092)

This commit is contained in:
Cønstantine Kovalensky 2023-11-13 22:01:42 +04:00 committed by GitHub
commit cb557e7345
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 3 deletions

View file

@ -145,7 +145,7 @@ if ($tor_reged && $tor_info) {
// Magnet link // Magnet link
$user_passkey = \TorrentPier\Legacy\Torrent::getPasskey($bt_user_id); $user_passkey = \TorrentPier\Legacy\Torrent::getPasskey($bt_user_id);
$tor_magnet = create_magnet($tor_info['info_hash'], $tor_info['info_hash_v2'], $user_passkey, wbr($t_data['topic_title'])); $tor_magnet = create_magnet($tor_info['info_hash'], $tor_info['info_hash_v2'], $user_passkey, html_entity_decode($t_data['topic_title'], ENT_QUOTES, 'UTF-8'));
// ratio limits // ratio limits
$min_ratio_dl = $bb_cfg['bt_min_ratio_allow_dl_tor']; $min_ratio_dl = $bb_cfg['bt_min_ratio_allow_dl_tor'];

View file

@ -702,7 +702,7 @@ if ($allowed_forums) {
$s_last = $tor['seeder_last_seen']; $s_last = $tor['seeder_last_seen'];
$att_id = $tor['attach_id']; $att_id = $tor['attach_id'];
$size = $tor['size']; $size = $tor['size'];
$tor_magnet = create_magnet($tor['info_hash'], $tor['info_hash_v2'], \TorrentPier\Legacy\Torrent::getPasskey($user_id), wbr($tor['topic_title'])); $tor_magnet = create_magnet($tor['info_hash'], $tor['info_hash_v2'], \TorrentPier\Legacy\Torrent::getPasskey($user_id), html_entity_decode($tor['topic_title'], ENT_QUOTES, 'UTF-8'));
$compl = $tor['complete_count']; $compl = $tor['complete_count'];
$dl_sp = ($dl) ? humn_size($dl, 0, 'KB') . '/s' : '0 KB/s'; $dl_sp = ($dl) ? humn_size($dl, 0, 'KB') . '/s' : '0 KB/s';
$ul_sp = ($ul) ? humn_size($ul, 0, 'KB') . '/s' : '0 KB/s'; $ul_sp = ($ul) ? humn_size($ul, 0, 'KB') . '/s' : '0 KB/s';

View file

@ -469,7 +469,7 @@ foreach ($topic_rowset as $topic) {
)); ));
if (isset($topic['tor_size'])) { if (isset($topic['tor_size'])) {
$tor_magnet = create_magnet($topic['info_hash'], $topic['info_hash_v2'], $topic['auth_key'], wbr($topic['topic_title'])); $tor_magnet = create_magnet($topic['info_hash'], $topic['info_hash_v2'], $topic['auth_key'], html_entity_decode($topic['topic_title'], ENT_QUOTES, 'UTF-8'));
$template->assign_block_vars('t.tor', array( $template->assign_block_vars('t.tor', array(
'SEEDERS' => (int)$topic['seeders'], 'SEEDERS' => (int)$topic['seeders'],