Skip to content

Node.js based forum software built for the modern web

encode both sides

Barış Soner Uşaklıddda8feb2110
diff --git a/public/src/client/topic.js b/public/src/client/topic.js
index 31e9b71ca6..2bc9979f7c 100644
--- a/public/src/client/topic.js
+++ b/public/src/client/topic.js
@@ -333,7 +333,7 @@ define('forum/topic', [
const topicMatch = validHref && pathname && pathname.match(/\/topic\/([\da-z-]+)/);
if (postMatch) {
const pid = postMatch[1];
- if (link.parents('[component="post"]').attr('data-pid') === pid) {
+ if (encodeURIComponent(link.parents('[component="post"]').attr('data-pid')) === encodeURIComponent(pid)) {
return; // dont render self post
}