mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-26 16:46:12 +01:00
fix: escape about me on user flags
This commit is contained in:
@@ -663,6 +663,7 @@ Flags.canFlag = async function (type, id, uid, skipLimitCheck = false) {
|
|||||||
Flags.getTarget = async function (type, id, uid) {
|
Flags.getTarget = async function (type, id, uid) {
|
||||||
if (type === 'user') {
|
if (type === 'user') {
|
||||||
const userData = await user.getUserData(id);
|
const userData = await user.getUserData(id);
|
||||||
|
userData.aboutme = validator.escape(String(userData.aboutme));
|
||||||
return userData && userData.uid ? userData : {};
|
return userData && userData.uid ? userData : {};
|
||||||
}
|
}
|
||||||
if (type === 'post') {
|
if (type === 'post') {
|
||||||
|
|||||||
@@ -123,7 +123,7 @@
|
|||||||
{{{ end }}}
|
{{{ end }}}
|
||||||
|
|
||||||
{{{ if type_bool.user }}}
|
{{{ 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}">{buildAvatar(target, "16px", true)}</a>
|
||||||
<a href="{config.relative_path}/user/{./target.userslug}">{target.username}</a>
|
<a href="{config.relative_path}/user/{./target.userslug}">{target.username}</a>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user