Bug 26102: Prevent XSS when To.json is used: admin/preferences.tt
Test that preference search term highlighting works correctly.
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 5df95693f9)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
(cherry picked from commit b4b87a3091a38985d13f2a6d2eb243589ec8b7dd)
Signed-off-by: Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz>
This commit is contained in:
parent
b257f25b1b
commit
f2063ecd9f
|
|
@ -200,7 +200,7 @@
|
|||
|
||||
});
|
||||
// This is here because of its dependence on template variables, everything else should go in js/pages/preferences.js - jpw
|
||||
var to_highlight = "[% searchfield |replace("'", "\'") |replace('"', '\"') |replace('\n', '\\n') |replace('\r', '\\r') | html %]";
|
||||
var to_highlight = "[% To.json( searchfield ) | html %]";
|
||||
var search_jumped = [% IF ( search_jumped ) %]true[% ELSE %]false[% END %];
|
||||
var MSG_NOTHING_TO_SAVE = _("Nothing to save");
|
||||
var MSG_SAVING = _("Saving...");
|
||||
|
|
|
|||
Loading…
Reference in New Issue