luci: NFQWS2_OPT: Block enter text with quotes

This commit is contained in:
remittor
2026-01-17 15:52:46 +03:00
parent 1f0d674185
commit c574e04a2b

View File

@@ -531,6 +531,10 @@ return baseclass.extend({
if (value != "" && value != "\t") { if (value != "" && value != "\t") {
value = '\n' + value + '\n'; value = '\n' + value + '\n';
if (this.multiline == 2) { 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, '');
value = value.replace(/'/g, ''); value = value.replace(/'/g, '');
} }