Bugzilla – Attachment 98699 Details for
Bug 23777
Text converted to html entity codes in cataloguing edit form
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 23777: Use TO.json in value_builder/unimarc_field_4XX.tt
Bug-23777-Use-TOjson-in-valuebuilderunimarcfield4X.patch (text/plain), 6.80 KB, created by
Jonathan Druart
on 2020-02-11 10:25:10 UTC
(
hide
)
Description:
Bug 23777: Use TO.json in value_builder/unimarc_field_4XX.tt
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2020-02-11 10:25:10 UTC
Size:
6.80 KB
patch
obsolete
>From a59f4d608cb669c9f1c9a95dce260b890a4da435 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Tue, 12 Nov 2019 09:30:27 +0100 >Subject: [PATCH] Bug 23777: Use TO.json in value_builder/unimarc_field_4XX.tt > >No idea how to test this but, as other fixes work, this one should, >right? > >Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz> >--- > .../cataloguing/value_builder/unimarc_field_4XX.tt | 36 ++++++++++++---------- > 1 file changed, 19 insertions(+), 17 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/unimarc_field_4XX.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/unimarc_field_4XX.tt >index 2268a0953c..7f139830ff 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/unimarc_field_4XX.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/unimarc_field_4XX.tt >@@ -1,4 +1,6 @@ > [% SET footerjs = 1 %] >+[% USE raw %] >+[% USE To %] > [% INCLUDE 'doc-head-open.inc' %] > <title>Koha › Cataloging › 4XX plugin</title> > [% INCLUDE 'doc-head-close.inc' %] >@@ -167,55 +169,55 @@ > var subfield = subfields[i+1]; > > if(code.value == '9'){ >- subfield.value = "[% subfield_value_9 |replace("'", "\'") |replace('"', '\"') |replace('\n', '\\n') |replace('\r', '\\r') | html %]"; >+ subfield.value = "[% To.json( subfield_value_9 ) | $raw ]"; > } > if(code.value == '0'){ >- subfield.value = "[% subfield_value_0 |replace("'", "\'") |replace('"', '\"') |replace('\n', '\\n') |replace('\r', '\\r') | html %]"; >+ subfield.value = "[% To.json( subfield_value_0 ) | $raw ]"; > } > if(code.value == 'a'){ >- subfield.value = "[% subfield_value_a |replace("'", "\'") |replace('"', '\"') |replace('\n', '\\n') |replace('\r', '\\r') | html %]"; >+ subfield.value = "[% To.json( subfield_value_a ) | $raw ]"; > } > if(code.value == 'c'){ >- subfield.value = "[% subfield_value_c |replace("'", "\'") |replace('"', '\"') |replace('\n', '\\n') |replace('\r', '\\r') | html %]"; >+ subfield.value = "[% To.json( subfield_value_c ) | $raw ]"; > } > if(code.value == 'd'){ >- subfield.value = "[% subfield_value_d |replace("'", "\'") |replace('"', '\"') |replace('\n', '\\n') |replace('\r', '\\r') | html %]"; >+ subfield.value = "[% To.json( subfield_value_d ) | $raw ]"; > } > if(code.value == 'e'){ >- subfield.value = "[% subfield_value_e |replace("'", "\'") |replace('"', '\"') |replace('\n', '\\n') |replace('\r', '\\r') | html %]"; >+ subfield.value = "[% To.json( subfield_value_e ) | $raw ]"; > } > if(code.value == 'h'){ >- subfield.value = "[% subfield_value_h |replace("'", "\'") |replace('"', '\"') |replace('\n', '\\n') |replace('\r', '\\r') | html %]"; >+ subfield.value = "[% To.json( subfield_value_h ) | $raw ]"; > } > if(code.value == 'i'){ >- subfield.value = "[% subfield_value_i |replace("'", "\'") |replace('"', '\"') |replace('\n', '\\n') |replace('\r', '\\r') | html %]"; >+ subfield.value = "[% To.json( subfield_value_i ) | $raw ]"; > } > if(code.value == 'l'){ >- subfield.value = "[% subfield_value_l |replace("'", "\'") |replace('"', '\"') |replace('\n', '\\n') |replace('\r', '\\r') | html %]"; >+ subfield.value = "[% To.json( subfield_value_l ) | $raw ]"; > } > if(code.value == 'n'){ >- subfield.value = "[% subfield_value_n |replace("'", "\'") |replace('"', '\"') |replace('\n', '\\n') |replace('\r', '\\r') | html %]"; >+ subfield.value = "[% To.json( subfield_value_n ) | $raw ]"; > } > if(code.value == 'o'){ >- subfield.value = "[% subfield_value_o |replace("'", "\'") |replace('"', '\"') |replace('\n', '\\n') |replace('\r', '\\r') | html %]"; >+ subfield.value = "[% To.json( subfield_value_o ) | $raw ]"; > } > if(code.value == 'p'){ >- subfield.value = "[% subfield_value_p |replace("'", "\'") |replace('"', '\"') |replace('\n', '\\n') |replace('\r', '\\r') | html %]"; >+ subfield.value = "[% To.json( subfield_value_p ) | $raw ]"; > } > if(code.value == 't'){ >- subfield.value = "[% subfield_value_t |replace("'", "\'") |replace('"', '\"') |replace('\n', '\\n') |replace('\r', '\\r') | html %]"; >+ subfield.value = "[% To.json( subfield_value_t ) | $raw ]"; > } > if(code.value == 'u'){ >- subfield.value = "[% subfield_value_u |replace("'", "\'") |replace('"', '\"') |replace('\n', '\\n') |replace('\r', '\\r') | html %]"; >+ subfield.value = "[% To.json( subfield_value_u ) | $raw ]"; > } > if(code.value == 'v'){ >- subfield.value = "[% subfield_value_v |replace("'", "\'") |replace('"', '\"') |replace('\n', '\\n') |replace('\r', '\\r') | html %]"; >+ subfield.value = "[% To.json( subfield_value_v ) | $raw ]"; > } > if(code.value == 'x'){ >- subfield.value = "[% subfield_value_x |replace("'", "\'") |replace('"', '\"') |replace('\n', '\\n') |replace('\r', '\\r') | html %]"; >+ subfield.value = "[% To.json( subfield_value_x ) | $raw ]"; > } > if(code.value == 'y'){ >- subfield.value = "[% subfield_value_y |replace("'", "\'") |replace('"', '\"') |replace('\n', '\\n') |replace('\r', '\\r') | html %]"; >+ subfield.value = "[% To.json( subfield_value_y ) | $raw ]"; > } > } > } >-- >2.11.0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 23777
:
95275
|
95279
|
95280
|
95281
|
95282
|
95283
|
95284
|
97685
|
97686
|
97687
|
97688
|
97689
|
97690
|
97691
|
98698
|
98699
|
98700
|
99341
|
99342
|
99343
|
99344
|
99345
|
99346
|
99347
|
99348
|
99570