Skip to content

Node.js based forum software built for the modern web

fix: pid in api call

Barış Soner Uşaklı70625133aef1
diff --git a/public/src/client/topic/votes.js b/public/src/client/topic/votes.js
index 9702b86227..3a2ef5af8e 100644
--- a/public/src/client/topic/votes.js
+++ b/public/src/client/topic/votes.js
@@ -44,7 +44,7 @@ define('forum/topic/votes', [
$this.attr('title', '');
}
- api.get(`/posts/${pid}/upvoters`, {}, function (err, data) {
+ api.get(`/posts/${encodeURIComponent(pid)}/upvoters`, {}, function (err, data) {
if (err) {
return alerts.error(err);
}
@@ -110,7 +110,7 @@ define('forum/topic/votes', [
if (!canSeeVotes()) {
return;
}
- api.get(`/posts/${pid}/voters`, {}, function (err, data) {
+ api.get(`/posts/${encodeURIComponent(pid)}/voters`, {}, function (err, data) {
if (err) {
return alerts.error(err);
}