Skip to content

Node.js based forum software built for the modern web

fix: escape about me on user flags

Barış Soner Uşaklı26026fb2d78a
diff --git a/src/flags.js b/src/flags.js
index 00bce1d9bd..be0f849244 100644
--- a/src/flags.js
+++ b/src/flags.js
@@ -663,6 +663,7 @@ Flags.canFlag = async function (type, id, uid, skipLimitCheck = false) {
Flags.getTarget = async function (type, id, uid) {
if (type === 'user') {
const userData = await user.getUserData(id);
+ userData.aboutme = validator.escape(String(userData.aboutme));
return userData && userData.uid ? userData : {};
}
if (type === 'post') {
diff --git a/src/views/flags/detail.tpl b/src/views/flags/detail.tpl
index 6c8cd657f3..c1e39af6ac 100644
--- a/src/views/flags/detail.tpl
+++ b/src/views/flags/detail.tpl
@@ -123,7 +123,7 @@
{{{ end }}}
{{{ if type_bool.user }}}
- <div class="d-flex gap-2">
+ <div class="d-flex gap-2 align-items-center lh-1 mb-2">
<a href="{config.relative_path}/user/{./target.userslug}">{buildAvatar(target, "16px", true)}</a>
<a href="{config.relative_path}/user/{./target.userslug}">{target.username}</a>
</div>