Bug 26102: [19.11] Prevent XSS when To.json is used: authorities/blinddetail-biblio-search.tt
Test the process of searching for and selecting an authority record for use in the basic MARC editor. Signed-off-by: Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz>
This commit is contained in:
parent
b4dbedbcd4
commit
8401cd292c
|
|
@ -1,3 +1,4 @@
|
|||
[% USE To %]
|
||||
[% SET footerjs = 1 %]
|
||||
[% INCLUDE 'doc-head-open.inc' %]
|
||||
<title>Koha › Authority details</title>
|
||||
|
|
@ -30,12 +31,12 @@
|
|||
var new_line = "";
|
||||
[% ELSE %]
|
||||
var new_line = "
|
||||
[%- FOREACH SUBFIELD_LOO IN SUBFIELD_LOOP -%]‡
|
||||
[%- SUBFIELD_LOO.marc_subfield |replace("'", "\'") |replace('"', '\"') |replace('\n', '\\n') |replace('\r', '\\r ') | html -%]
|
||||
[%- FOREACH marc_value IN SUBFIELD_LOO.marc_values -%]
|
||||
[%- marc_value |replace("'", "\'") |replace('"', '\"') |replace('\n', '\\n') |replace('\r', '\\r') | html -%]
|
||||
[%- END -%]
|
||||
[%- END -%]‡9[% authid | html %]";
|
||||
[%- FOREACH SUBFIELD_LOO IN SUBFIELD_LOOP -%]‡
|
||||
[%- To.json( SUBFIELD_LOO.marc_subfield ) | html -%]
|
||||
[%- FOREACH marc_value IN SUBFIELD_LOO.marc_values -%]
|
||||
[%- To.json( marc_value ) | html -%]
|
||||
[%- END -%]
|
||||
[%- END -%]‡9[% authid | html %]";
|
||||
[% END %]
|
||||
RancorReplaceField( new_line, "[% indicator1 | html %]", "[% indicator2 | html %]" );
|
||||
[% ELSE %]
|
||||
|
|
|
|||
Loading…
Reference in New Issue