mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-26 16:46:12 +01:00
fix: strip html from remote custom fields, linkify if url detected in now-plaintext field value
This commit is contained in:
@@ -151,11 +151,12 @@ helpers.getCustomUserFields = async function (userData) {
|
||||
const fields = Array
|
||||
.from(new URLSearchParams(customFields))
|
||||
.reduce((memo, [name, value]) => {
|
||||
const isUrl = validator.isURL(value);
|
||||
memo.push({
|
||||
key: slugify(name),
|
||||
name,
|
||||
value,
|
||||
type: 'input-text',
|
||||
type: isUrl ? 'input-link' : 'input-text',
|
||||
'min-rep': '',
|
||||
icon: 'fa-solid fa-circle-info',
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user