diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt index 68e5388e31..5f42a03de6 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt @@ -1,5 +1,6 @@ [% USE raw %] [% USE Asset %] +[% USE To %] [% USE Koha %] [% USE Biblio %] [% USE KohaDates %] @@ -772,7 +773,7 @@ [% IF ( query_desc ) %] toHighlight = $("p,span.results_summary,a.title"); - var query_desc = "[% query_desc |replace("'", "\'") |replace('"', '\"') |replace('\n', '\\n') |replace('\r', '\\r') | html %]"; + var query_desc = "[% To.json( query_desc ) | html %]", q_array = query_desc.split(" "); // ensure that we don't have "" at the end of the array, which can // break the highlighter