luci: NFQWS_OPT: Block enter text with quotes

This commit is contained in:
remittor
2026-01-17 13:57:49 +03:00
parent 2ce84ee555
commit 42d8ee8ba6

View File

@@ -525,6 +525,10 @@ return baseclass.extend({
if (value != "" && value != "\t") {
value = '\n' + value + '\n';
if (this.multiline == 2) {
if (value.includes("'") || value.includes('"')) {
alert(_('Unable to save the contents') + ':\n' + _('text cannot contain quotes!'));
return false;
}
value = value.replace(/"/g, '');
value = value.replace(/'/g, '');
}