luci-mod-system: ensure that textarea contents are properly escaped

Fixes: #3090
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
This commit is contained in:
Jo-Philipp Wich 2019-09-23 11:44:18 +02:00
parent cf239f9e10
commit f3ff641d8e
2 changed files with 2 additions and 2 deletions

View file

@ -40,7 +40,7 @@ return L.view.extend({
E('p', {},
_('This is the system crontab in which scheduled tasks can be defined.') +
_('<br/>Note: you need to manually restart the cron service if the crontab file was empty before editing.')),
E('p', {}, E('textarea', { 'style': 'width:100%', 'rows': 10 }, crontab != null ? crontab : ''))
E('p', {}, E('textarea', { 'style': 'width:100%', 'rows': 10 }, [ crontab != null ? crontab : '' ]))
]);
},

View file

@ -125,7 +125,7 @@ return L.view.extend({
]),
E('div', { 'data-tab': 'rc', 'data-tab-title': _('Local Startup') }, [
E('p', {}, _('This is the content of /etc/rc.local. Insert your own commands here (in front of \'exit 0\') to execute them at the end of the boot process.')),
E('p', {}, E('textarea', { 'style': 'width:100%', 'rows': 20 }, rcLocal != null ? rcLocal : '')),
E('p', {}, E('textarea', { 'style': 'width:100%', 'rows': 20 }, [ (rcLocal != null ? rcLocal : '') ]),
E('div', { 'class': 'cbi-page-actions' }, [
E('button', {
'class': 'btn cbi-button-save',