mirror of
https://github.com/gchq/CyberChef
synced 2024-12-29 14:03:10 +00:00
use Utils.escapeHtml instead of manual escaping
This commit is contained in:
parent
d9d6b7aa37
commit
ab283fc801
1 changed files with 2 additions and 3 deletions
|
@ -5,6 +5,7 @@
|
|||
*/
|
||||
|
||||
import Operation from "../Operation.mjs";
|
||||
import Utils from "../Utils.mjs";
|
||||
import moment from "moment-timezone";
|
||||
import {DATETIME_FORMATS, FORMAT_EXAMPLES} from "../lib/DateTime.mjs";
|
||||
|
||||
|
@ -85,9 +86,7 @@ class TranslateDateTimeFormat extends Operation {
|
|||
if (data === this.invalidFormatMessage) {
|
||||
return `${data}\n\n${FORMAT_EXAMPLES}`;
|
||||
}
|
||||
return data.replace(/&/g, "&")
|
||||
.replace(/</g, "<")
|
||||
.replace(/>/g, ">");
|
||||
return Utils.escapeHtml(data);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue