mirror of
https://github.com/jambonz/jambonz-feature-server.git
synced 2025-12-20 16:50:39 +00:00
do not escape req.body.tag (#559)
Co-authored-by: Markus Frindt <m.frindt@cognigy.com>
This commit is contained in:
@@ -116,12 +116,9 @@ const customSanitizeFunction = (value) => {
|
|||||||
/* trims characters at the beginning and at the end of a string */
|
/* trims characters at the beginning and at the end of a string */
|
||||||
value = value.trim();
|
value = value.trim();
|
||||||
|
|
||||||
/* We don't escape URLs but verify them via new URL */
|
/* Verify strings including 'http' via new URL */
|
||||||
if (value.includes('http')) {
|
if (value.includes('http')) {
|
||||||
value = new URL(value).toString();
|
value = new URL(value).toString();
|
||||||
} else {
|
|
||||||
/* replaces <, >, &, ', " and / with their corresponding HTML entities */
|
|
||||||
value = escape(value);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
|||||||
Reference in New Issue
Block a user