fix(all): Strip all HTML from Bot Input.

This commit is contained in:
Rodrigo Rodriguez 2020-10-30 12:54:07 -03:00
parent 3e9d76059e
commit dceb0fd1c1

View file

@ -765,8 +765,8 @@ export class GBMinService {
await step.continueDialog(); await step.continueDialog();
} else { } else {
let text = context.activity.text; let text = context.activity.text;
text = text.replace(/<\/?[^>]+(>|$)/g, ""); text = text.replace(/<([^>]+?)([^>]*?)>(.*?)<\/\1>/ig, "");
// Spells check the input text before translating. // Spells check the input text before translating.
const key = min.instance.spellcheckerKey ? min.instance.spellcheckerKey : min.instance.spellcheckerKey; const key = min.instance.spellcheckerKey ? min.instance.spellcheckerKey : min.instance.spellcheckerKey;