Skip to content
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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for html entities being displayed in magnet links #329

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
**Merged pull requests:**

- Release v2.1.5-2024.05-alpha2 馃帀
- Fix for html entities being displayed in magnet links [\#329](https://github.com/torrentpier/torrentpier-lts/pull/329) ([belomaxorka](https://github.com/belomaxorka), [kovalensky](https://github.com/kovalensky))
- Fixed a bug causing inability to view file contents for some torrents [\#328](https://github.com/torrentpier/torrentpier-lts/pull/328) ([belomaxorka](https://github.com/belomaxorka), [kovalensky](https://github.com/kovalensky))
- Updated translations
- Some other changes / improvements
Expand Down
2 changes: 1 addition & 1 deletion library/attach_mod/displaying_torrent.php
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@

// Magnet link
$passkey = DB()->fetch_row("SELECT auth_key FROM ". BB_BT_USERS ." WHERE user_id = ". (int) $bt_user_id ." LIMIT 1");
$tor_magnet = create_magnet($tor_info['info_hash'], $passkey['auth_key'], wbr($t_data['topic_title']));
$tor_magnet = create_magnet($tor_info['info_hash'], $passkey['auth_key'], html_entity_decode($t_data['topic_title'], ENT_QUOTES, 'UTF-8'));

// ratio limits
$min_ratio_dl = $bb_cfg['bt_min_ratio_allow_dl_tor'];
Expand Down
2 changes: 1 addition & 1 deletion tracker.php
Original file line number Diff line number Diff line change
Expand Up @@ -787,7 +787,7 @@
$s_last = $tor['seeder_last_seen'];
$att_id = $tor['attach_id'];
$size = $tor['size'];
$tor_magnet = create_magnet($tor['info_hash'], $passkey['auth_key'], wbr($tor['topic_title']));
$tor_magnet = create_magnet($tor['info_hash'], $passkey['auth_key'], html_entity_decode($tor['topic_title'], ENT_QUOTES, 'UTF-8'));
$compl = $tor['complete_count'];
$dl_sp = ($dl) ? humn_size($dl, 0, 'KB') .'/s' : '0 KB/s';
$ul_sp = ($ul) ? humn_size($ul, 0, 'KB') .'/s' : '0 KB/s';
Expand Down
2 changes: 1 addition & 1 deletion viewforum.php
Original file line number Diff line number Diff line change
Expand Up @@ -512,7 +512,7 @@

if (isset($topic['tor_size']))
{
$tor_magnet = create_magnet($topic['info_hash'], $topic['auth_key'], wbr($topic['topic_title']));
$tor_magnet = create_magnet($topic['info_hash'], $topic['auth_key'], html_entity_decode($topic['topic_title'], ENT_QUOTES, 'UTF-8'));

$template->assign_block_vars('t.tor', array(
'SEEDERS' => (int) $topic['seeders'],
Expand Down