fix nfo display

This commit is contained in:
xiaomlove
2022-10-01 19:54:19 +08:00
parent ee00be3840
commit cdaec9bc62
3 changed files with 41 additions and 3 deletions
+1 -1
View File
@@ -300,7 +300,7 @@ JS;
if (user_can('viewnfo') && $CURUSER['shownfo'] != 'no' && $row["nfosz"] > 0){
if (!$nfo = $Cache->get_value('nfo_block_torrent_id_'.$id)){
$nfo = code($row["nfo"], get_setting('torrent.nfo_view_style_default'));
$nfo = code_new($row["nfo"], get_setting('torrent.nfo_view_style_default'));
$Cache->cache_value('nfo_block_torrent_id_'.$id, $nfo, 604800);
}
tr("<a href=\"javascript: klappe_news('nfo')\"><img class=\"plus\" src=\"pic/trans.gif\" alt=\"Show/Hide\" id=\"picnfo\" title=\"".$lang_details['title_show_or_hide']."\" /> ".$lang_details['text_nfo']."</a><br /><a href=\"viewnfo.php?id=".$row['id']."\" class=\"sublink\">". $lang_details['text_view_nfo']. "</a>", "<div id='knfo' style=\"display: none;\"><pre style=\"font-size:10pt; font-family: 'Courier New', monospace;white-space: break-spaces\">".$nfo."</pre></div>\n", 1);
+2 -2
View File
@@ -28,13 +28,13 @@ if ($view == "latin-1" || $view == "fonthack") {
// NOTICE: TBSource specifies Latin-1 encoding in include/bittorrent.php:
// stdhead()
//$nfo = htmlspecialchars(($a["nfo"]));
$nfo = code($a["nfo"], $view);
$nfo = code_new($a["nfo"], $view);
}
else {
// Convert from ibm-437 to html unicode entities.
// take special care of Swedish letters if in magic view.
//$nfo = code($a["nfo"], $view == "magic");
$nfo = code($a["nfo"], $view);
$nfo = code_new($a["nfo"], $view);
}
stdhead($lang_viewnfo['head_view_nfo']);