Bugzilla – Attachment 171344 Details for
Bug 37606
Framework export module should escape double quotes
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 37606 - Fix framework export module to escape double quotes
Bug-37606---Fix-framework-export-module-to-escape-.patch (text/plain), 1.36 KB, created by
Sukhmandeep
on 2024-09-11 15:50:12 UTC
(
hide
)
Description:
Bug 37606 - Fix framework export module to escape double quotes
Filename:
MIME Type:
Creator:
Sukhmandeep
Created:
2024-09-11 15:50:12 UTC
Size:
1.36 KB
patch
obsolete
>From 4c369c875d2ca57fb1738cef311c207a3115f1ff Mon Sep 17 00:00:00 2001 >From: Baptiste Wojtkowski <bski@laposte.net> >Date: Fri, 9 Aug 2024 16:33:37 +0200 >Subject: [PATCH] Bug 37606 - Fix framework export module to escape double > quotes > >When exporting a framework as csv, the exporter does not check the presence of double quote in the fields. Hence, if there is one double quote, the csv is broken. > >TEST PLAN: >1 - Change a framework to add a field containing double quote in name >2 - Export it in csv >3 - Create a new framework >4 - Import the csv in the new framework -> every fields after the one >containing double quotes should be broke. Every other fields should have >no subfield >5 - APPLY PATCH >6 - Repeat 2-5 -> everything should be correctly exported > >Signed-off-by: Sukhmandeep Benipal <sukhmandeep.benipal@inLibro.com> >--- > C4/ImportExportFramework.pm | 1 + > 1 file changed, 1 insertion(+) > >diff --git a/C4/ImportExportFramework.pm b/C4/ImportExportFramework.pm >index 3d44d46ec3..16295d61ab 100644 >--- a/C4/ImportExportFramework.pm >+++ b/C4/ImportExportFramework.pm >@@ -291,6 +291,7 @@ sub _export_table_csv > for my $field (@fields) { > my $value = $hashRef->{$field} // q||; > $value =~ s/[\r\n]//g; >+ $value =~ s/"/""/g; > $$strCSV .= '"' . $value . '",'; > } > chop $$strCSV; >-- >2.34.1
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 37606
:
170199
|
170200
|
171343
|
171344
|
172934