mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-03-03 11:01:20 +01:00
fix: #13993, encodeURICompoent pid since it can be AP url
This commit is contained in:
@@ -396,7 +396,7 @@ helpers.setCategoryTeaser = function (category) {
|
|||||||
if (Array.isArray(category.posts) && category.posts.length && category.posts[0]) {
|
if (Array.isArray(category.posts) && category.posts.length && category.posts[0]) {
|
||||||
const post = category.posts[0];
|
const post = category.posts[0];
|
||||||
category.teaser = {
|
category.teaser = {
|
||||||
url: `${nconf.get('relative_path')}/post/${post.pid}`,
|
url: `${nconf.get('relative_path')}/post/${encodeURIComponent(post.pid)}`,
|
||||||
timestampISO: post.timestampISO,
|
timestampISO: post.timestampISO,
|
||||||
pid: post.pid,
|
pid: post.pid,
|
||||||
tid: post.tid,
|
tid: post.tid,
|
||||||
|
|||||||
Reference in New Issue
Block a user