Bug 26666

Summary: Display issue with address information
Product: Koha Reporter: Séverine Queune <severine.queune>
Component: PatronsAssignee: Katrin Fischer <katrin.fischer>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: gmcharlt, julian.maurice, kyle.m.hall, lucas
Version: MainKeywords: Academy
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
20.11.00
Attachments: Line break tag visible on master 20.06
Bug 26666: Fix line breaks in addresses displayed with AddressFormat French or German
Bug 26666: Fix line breaks in addresses displayed with AddressFormat French or German
Bug 26666: Fix line breaks in addresses displayed with AddressFormat French or German
Bug 26666: (QA follow-up) Add 'USE raw' in template

Description Séverine Queune 2020-10-13 11:46:50 UTC
Created attachment 111539 [details]
Line break tag visible on master 20.06

There is a display issue with the adress informations on patron's account : city and country are separated by an unexpected line break tag visible on patronbriefinfo and /moremember.pl page.
See screenshot attached.
Comment 1 Séverine Queune 2020-10-14 16:29:34 UTC
Seen also on return page when there is a hold.
Comment 2 Katrin Fischer 2020-10-15 23:41:59 UTC
This also happens for master for AddressFormat French and German, but not for US.
Comment 3 Katrin Fischer 2020-10-16 00:04:01 UTC
Created attachment 111819 [details] [review]
Bug 26666: Fix line breaks in addresses displayed with AddressFormat French or German

When Addressformat is set to French or German the addresses on the Details
tab will display <br /> in plain text. This is because a TT variable is used
for adding line breaks that is either set to <br /> or "". Then this variable is
escaped with the html filter... so we see the HTML tag uninterpreted.
Switching to $raw for this specific case.

To test:
- Go to any patron account,
- Fill in the various address fields
- Switch the AddressFormat system preference to different settings
- Verify the false display for French and German on the Details tab and
  in the brief info on the left side in the patron account
- Apply patch
- Repeat testing
- All AddressFormats should now display correctly
Comment 4 Séverine Queune 2020-10-16 06:52:25 UTC
Created attachment 111827 [details] [review]
Bug 26666: Fix line breaks in addresses displayed with AddressFormat French or German

When Addressformat is set to French or German the addresses on the Details
tab will display <br /> in plain text. This is because a TT variable is used
for adding line breaks that is either set to <br /> or "". Then this variable is
escaped with the html filter... so we see the HTML tag uninterpreted.
Switching to $raw for this specific case.

To test:
- Go to any patron account,
- Fill in the various address fields
- Switch the AddressFormat system preference to different settings
- Verify the false display for French and German on the Details tab and
  in the brief info on the left side in the patron account
- Apply patch
- Repeat testing
- All AddressFormats should now display correctly

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Comment 5 Séverine Queune 2020-10-16 06:55:26 UTC
Thanks Katrin for the quick patch !
Comment 6 Julian Maurice 2020-10-16 07:57:38 UTC
Created attachment 111830 [details] [review]
Bug 26666: Fix line breaks in addresses displayed with AddressFormat French or German

When Addressformat is set to French or German the addresses on the Details
tab will display <br /> in plain text. This is because a TT variable is used
for adding line breaks that is either set to <br /> or "". Then this variable is
escaped with the html filter... so we see the HTML tag uninterpreted.
Switching to $raw for this specific case.

To test:
- Go to any patron account,
- Fill in the various address fields
- Switch the AddressFormat system preference to different settings
- Verify the false display for French and German on the Details tab and
  in the brief info on the left side in the patron account
- Apply patch
- Repeat testing
- All AddressFormats should now display correctly

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Comment 7 Julian Maurice 2020-10-16 07:57:45 UTC
Created attachment 111831 [details] [review]
Bug 26666: (QA follow-up) Add 'USE raw' in template

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Comment 8 Jonathan Druart 2020-10-25 23:08:00 UTC
Pushed to master for 20.11, thanks to everybody involved!
Comment 9 Lucas Gass 2020-11-13 19:05:00 UTC
doesn't apply cleanly to 20.05.x, no backport