Skip to content

Commit

Permalink
Use Twig escaping
Browse files Browse the repository at this point in the history
  • Loading branch information
kasimi committed Oct 21, 2017
1 parent f2b0e0f commit cb05cb8
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion adm/style/acp_mchat_globalusersettings_content.html
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@
<dl>
<dt><label for="user_mchat_dateoptions">{{ lang('MCHAT_DATE_FORMAT') ~ lang('COLON') }}</label><br /><span>{{ lang('MCHAT_DATE_FORMAT_EXPLAIN') }}</span></dt>
<dd>
<select name="user_mchat_dateoptions" id="user_mchat_dateoptions" onchange="phpbb.toggleDisplay('user_mchat_custom_date', this.value == 'custom' ? 1 : -1); document.getElementById('user_mchat_date').value = this.value == 'custom' ? '{{ A_MCHAT_DEFAULT_DATEFORMAT }}' : this.value;"{% if MCHAT_DATE_NOAUTH %} disabled{% endif %}>
<select name="user_mchat_dateoptions" id="user_mchat_dateoptions" onchange="phpbb.toggleDisplay('user_mchat_custom_date', this.value == 'custom' ? 1 : -1); document.getElementById('user_mchat_date').value = this.value == 'custom' ? '{{ MCHAT_DEFAULT_DATEFORMAT | escape('js') }}' : this.value;"{% if MCHAT_DATE_NOAUTH %} disabled{% endif %}>
{{ S_MCHAT_DATEFORMAT_OPTIONS }}
</select>
</dd>
Expand Down
2 changes: 1 addition & 1 deletion core/settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,7 @@ public function get_date_template_data($selected)

return array(
'S_MCHAT_DATEFORMAT_OPTIONS' => $dateformat_options,
'A_MCHAT_DEFAULT_DATEFORMAT' => addslashes($ucp_settings['mchat_date']['default']),
'MCHAT_DEFAULT_DATEFORMAT' => $ucp_settings['mchat_date']['default'],
'S_MCHAT_CUSTOM_DATEFORMAT' => $s_custom,
);
}
Expand Down
2 changes: 1 addition & 1 deletion styles/prosilver/template/ucp_mchat.html
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ <h2>{{ lang('MCHAT_PREFERENCES') }}</h2>
<dl>
<dt><label for="user_mchat_dateoptions">{{ lang('MCHAT_DATE_FORMAT') ~ lang('COLON') }}</label><br /><span>{{ lang('MCHAT_DATE_FORMAT_EXPLAIN') }}</span></dt>
<dd>
<select name="user_mchat_dateoptions" id="user_mchat_dateoptions" onchange="phpbb.toggleDisplay('user_mchat_custom_date', this.value == 'custom' ? 1 : -1); document.getElementById('user_mchat_date').value = this.value == 'custom' ? '{{ A_MCHAT_DEFAULT_DATEFORMAT }}' : this.value;">
<select name="user_mchat_dateoptions" id="user_mchat_dateoptions" onchange="phpbb.toggleDisplay('user_mchat_custom_date', this.value == 'custom' ? 1 : -1); document.getElementById('user_mchat_date').value = this.value == 'custom' ? '{{ MCHAT_DEFAULT_DATEFORMAT | escape('js') }}' : this.value;">
{{ S_MCHAT_DATEFORMAT_OPTIONS }}
</select>
</dd>
Expand Down

0 comments on commit cb05cb8

Please sign in to comment.