From 87f89621a9f3da55a6903cb424a41bbe3e7e1271 Mon Sep 17 00:00:00 2001 From: "shimoda.m@nds-tyo.co.jp" Date: Wed, 20 Sep 2023 00:20:56 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20JSON=E3=81=A7=E8=A8=B1=E5=8F=AF=E3=81=95?= =?UTF-8?q?=E3=82=8C=E3=81=AA=E3=81=84Unicode=E5=88=B6=E5=BE=A1=E6=96=87?= =?UTF-8?q?=E5=AD=97=E5=88=97=E3=82=92=E3=83=95=E3=83=AD=E3=83=B3=E3=83=88?= =?UTF-8?q?=E5=81=B4=E3=81=A7=E5=A4=89=E6=8F=9B=E3=81=99=E3=82=8B=E3=82=88?= =?UTF-8?q?=E3=81=86=E3=81=AB=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ecs/jskult-webapp/src/templates/bioSearchList.html | 3 ++- ecs/jskult-webapp/src/templates/docSearch.html | 3 ++- ecs/jskult-webapp/src/templates/instSearch.html | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/ecs/jskult-webapp/src/templates/bioSearchList.html b/ecs/jskult-webapp/src/templates/bioSearchList.html index f0d47570..64fa09b5 100644 --- a/ecs/jskult-webapp/src/templates/bioSearchList.html +++ b/ecs/jskult-webapp/src/templates/bioSearchList.html @@ -370,7 +370,8 @@ // {% autoescape False%} // ジェネレータですこしずつ取得してリストに詰める // {% for bio_data_json_str in bio.bio_data_json_str() %} - searchResultData.push(...JSON.parse('{{bio_data_json_str}}')) + // unicode制御文字をエスケープしてからJSON.parseする + searchResultData.push(...JSON.parse('{{bio_data_json_str}}'.replace(/[\u0000-\u001F]+/g, " "))) // {% endfor %} // {% endautoescape%} // {% endif %} diff --git a/ecs/jskult-webapp/src/templates/docSearch.html b/ecs/jskult-webapp/src/templates/docSearch.html index c9e30752..6d50f29b 100644 --- a/ecs/jskult-webapp/src/templates/docSearch.html +++ b/ecs/jskult-webapp/src/templates/docSearch.html @@ -273,7 +273,8 @@ // {% autoescape False%} // ジェネレータですこしずつ取得してリストに詰める // {% for ultmarc_data_json_str in ultmarc.ultmarc_data_json_str() %} - searchResultData.push(...JSON.parse('{{ultmarc_data_json_str}}')) + // unicode制御文字をエスケープしてからJSON.parseする + searchResultData.push(...JSON.parse('{{ultmarc_data_json_str}}'.replace(/[\u0000-\u001F]+/g, " "))) // {% endfor %} // {% endautoescape%} // {% endif %} diff --git a/ecs/jskult-webapp/src/templates/instSearch.html b/ecs/jskult-webapp/src/templates/instSearch.html index d977dcae..2bb81667 100644 --- a/ecs/jskult-webapp/src/templates/instSearch.html +++ b/ecs/jskult-webapp/src/templates/instSearch.html @@ -257,7 +257,8 @@ // {% autoescape False%} // ジェネレータですこしずつ取得してリストに詰める // {% for ultmarc_data_json_str in ultmarc.ultmarc_data_json_str() %} - searchResultData.push(...JSON.parse('{{ultmarc_data_json_str}}')) + // unicode制御文字をエスケープしてからJSON.parseする + searchResultData.push(...JSON.parse('{{ultmarc_data_json_str}}'.replace(/[\u0000-\u001F]+/g, " "))) // {% endfor %} // {% endautoescape%} // {% endif %}