mirror of
https://github.com/versia-pub/server.git
synced 2026-03-13 22:09:16 +01:00
feat(api): ✨ Reimplement HTML sanitization
This commit is contained in:
parent
cac726ac1b
commit
febddc2a8b
4 changed files with 123 additions and 126 deletions
|
|
@ -97,19 +97,10 @@ export default apiRoute<typeof meta, typeof schema>(
|
|||
|
||||
const sanitizedNote = await sanitizeHtml(note ?? "");
|
||||
|
||||
const sanitizedDisplayName = display_name ?? ""; /* sanitize(display_name ?? "", {
|
||||
ALLOWED_TAGS: [],
|
||||
ALLOWED_ATTR: [],
|
||||
});
|
||||
*/
|
||||
/* if (!user.source) {
|
||||
user.source = {
|
||||
privacy: "public",
|
||||
sensitive: false,
|
||||
language: "en",
|
||||
note: "",
|
||||
};
|
||||
} */
|
||||
const sanitizedDisplayName = await sanitizeHtml(display_name ?? "", {
|
||||
ALLOWED_TAGS: [],
|
||||
ALLOWED_ATTR: [],
|
||||
});
|
||||
|
||||
let mediaManager: MediaBackend;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue