Skip to content

Commit

Permalink
Fix for html entities being displayed in magnet links (#329)
Browse files Browse the repository at this point in the history
* Fix for html entities being displayed in magnet links

Co-Authored-By: Cønstantine Kovalensky <45331093+kovalensky@users.noreply.github.com>

* Update CHANGELOG.md

Co-Authored-By: Cønstantine Kovalensky <45331093+kovalensky@users.noreply.github.com>

---------

Co-authored-by: Cønstantine Kovalensky <45331093+kovalensky@users.noreply.github.com>
  • Loading branch information
belomaxorka and kovalensky committed Nov 14, 2023
1 parent 5b8f990 commit 0892b55
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 3 deletions.
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

0 comments on commit 0892b55

Please sign in to comment.