Skip to content

Node.js based forum software built for the modern web

fix: decode HTML entities in picture and cover when mocking AP user

Julian Lam635a59b8ec11
diff --git a/src/activitypub/mocks.js b/src/activitypub/mocks.js
index 6837c036cb..86661718bd 100644
--- a/src/activitypub/mocks.js
+++ b/src/activitypub/mocks.js
@@ -413,6 +413,7 @@ Mocks.actors.user = async (uid) => {
}
if (picture) {
+ picture = utils.decodeHTMLEntities(picture);
const imagePath = await user.getLocalAvatarPath(uid);
picture = {
type: 'Image',
@@ -422,6 +423,7 @@ Mocks.actors.user = async (uid) => {
}
if (cover) {
+ cover = utils.decodeHTMLEntities(cover);
const imagePath = await user.getLocalCoverPath(uid);
cover = {
type: 'Image',