Fixed XSS in TranslateDateTimeFormat

This commit is contained in:
Tomoya Nakanishi 2023-03-01 03:39:57 +09:00
parent 2efd075803
commit 5cfc1abf41
No known key found for this signature in database
GPG key ID: B35B694056344D94

View file

@ -24,7 +24,7 @@ class TranslateDateTimeFormat extends Operation {
this.description = "Parses a datetime string in one format and re-writes it in another.<br><br>Run with no input to see the relevant format string examples.";
this.infoURL = "https://momentjs.com/docs/#/parsing/string-format/";
this.inputType = "string";
this.outputType = "html";
this.outputType = "string";
this.args = [
{
"name": "Built in formats",
@ -58,7 +58,7 @@ class TranslateDateTimeFormat extends Operation {
/**
* @param {string} input
* @param {Object[]} args
* @returns {html}
* @returns {string}
*/
run(input, args) {
const [inputFormat, inputTimezone, outputFormat, outputTimezone] = args.slice(1);