diff --git a/system/pages/forum/edit_post.php b/system/pages/forum/edit_post.php index 11c96287..4b7976aa 100644 --- a/system/pages/forum/edit_post.php +++ b/system/pages/forum/edit_post.php @@ -23,7 +23,7 @@ if(Forum::canPost($account_logged)) if(isset($thread['id'])) { $first_post = $db->query("SELECT `" . FORUM_TABLE_PREFIX . "forum`.`author_guid`, `" . FORUM_TABLE_PREFIX . "forum`.`author_aid`, `" . FORUM_TABLE_PREFIX . "forum`.`first_post`, `" . FORUM_TABLE_PREFIX . "forum`.`post_topic`, `" . FORUM_TABLE_PREFIX . "forum`.`post_text`, `" . FORUM_TABLE_PREFIX . "forum`.`post_smile`, `" . FORUM_TABLE_PREFIX . "forum`.`id`, `" . FORUM_TABLE_PREFIX . "forum`.`section` FROM `" . FORUM_TABLE_PREFIX . "forum` WHERE `" . FORUM_TABLE_PREFIX . "forum`.`id` = ".(int) $thread['first_post']." LIMIT 1")->fetch(); - echo 'Boards >> '.$sections[$thread['section']]['name'].' >> '.$first_post['post_topic'].' >> Edit post'; + echo 'Boards >> '.$sections[$thread['section']]['name'].' >> '.htmlspecialchars($first_post['post_topic']).' >> Edit post'; if(Forum::hasAccess($thread['section'] && ($account_logged->getId() == $thread['author_aid'] || Forum::isModerator()))) { $char_id = $post_topic = $text = $smile = $html = null; diff --git a/system/pages/forum/new_post.php b/system/pages/forum/new_post.php index 32eb761b..2c271348 100644 --- a/system/pages/forum/new_post.php +++ b/system/pages/forum/new_post.php @@ -24,7 +24,7 @@ if(Forum::canPost($account_logged)) if(isset($thread['id']) && Forum::hasAccess($thread['section'])) { - echo 'Boards >> '.$sections[$thread['section']]['name'].' >> '.$thread['post_topic'].' >> Post new reply

'.$thread['post_topic'].'

'; + echo 'Boards >> '.$sections[$thread['section']]['name'].' >> '.htmlspecialchars($thread['post_topic']).' >> Post new reply

'.htmlspecialchars($thread['post_topic']).'

'; $quote = isset($_REQUEST['quote']) ? (int) $_REQUEST['quote'] : NULL; $text = isset($_REQUEST['text']) ? stripslashes(trim($_REQUEST['text'])) : NULL; @@ -37,7 +37,7 @@ if(Forum::canPost($account_logged)) if (!superAdmin()) { $html = 0; } - + if(isset($_REQUEST['quote'])) { $quoted_post = $db->query("SELECT `players`.`name`, `" . FORUM_TABLE_PREFIX . "forum`.`post_text`, `" . FORUM_TABLE_PREFIX . "forum`.`post_date` FROM `players`, `" . FORUM_TABLE_PREFIX . "forum` WHERE `players`.`id` = `" . FORUM_TABLE_PREFIX . "forum`.`author_guid` AND `" . FORUM_TABLE_PREFIX . "forum`.`id` = ".(int) $quote)->fetchAll(); diff --git a/system/pages/forum/show_board.php b/system/pages/forum/show_board.php index e0e06583..a355036d 100644 --- a/system/pages/forum/show_board.php +++ b/system/pages/forum/show_board.php @@ -62,7 +62,7 @@ if(isset($last_threads[0])) if(Forum::isModerator()) { echo '[MOVE]'; - echo '[REMOVE] '; + echo '[REMOVE] '; } $player->load($thread['player_id']); @@ -73,7 +73,7 @@ if(isset($last_threads[0])) $player_account = $player->getAccount(); $canEditForum = $player_account->hasFlag(FLAG_CONTENT_FORUM) || $player_account->isAdmin(); - echo ''.($canEditForum ? $thread['post_topic'] : htmlspecialchars($thread['post_topic'])) . '
'.($canEditForum ? substr(strip_tags($thread['post_text']), 0, 50) : htmlspecialchars(substr($thread['post_text'], 0, 50))).'...' . getPlayerLink($thread['name']) . ''.(int) $thread['replies'].''.(int) $thread['views'].''; + echo ''.htmlspecialchars($thread['post_topic']) . '
'.($canEditForum ? substr(strip_tags($thread['post_text']), 0, 50) : htmlspecialchars(substr($thread['post_text'], 0, 50))).'...' . getPlayerLink($thread['name']) . ''.(int) $thread['replies'].''.(int) $thread['views'].''; if($thread['last_post'] > 0) { $last_post = $db->query("SELECT `players`.`name`, `" . FORUM_TABLE_PREFIX . "forum`.`post_date` FROM `players`, `" . FORUM_TABLE_PREFIX . "forum` WHERE `" . FORUM_TABLE_PREFIX . "forum`.`first_post` = ".(int) $thread['id']." AND `players`.`id` = `" . FORUM_TABLE_PREFIX . "forum`.`author_guid` ORDER BY `post_date` DESC LIMIT 1")->fetch(); diff --git a/system/templates/forum.new_post.html.twig b/system/templates/forum.new_post.html.twig index 6220cddb..bbba74d2 100644 --- a/system/templates/forum.new_post.html.twig +++ b/system/templates/forum.new_post.html.twig @@ -49,7 +49,7 @@ {% set i = 0 %}
- Last 5 posts from thread: {{ topic|raw }} + Last 5 posts from thread: {{ topic }}