mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2026-06-18 08:31:32 +00:00
Avoid usage of raw filter in javascript to minimize risk
This commit is contained in:
parent
0c5f8dc9fd
commit
b357ee196c
1 changed files with 2 additions and 2 deletions
|
|
@ -132,8 +132,8 @@
|
||||||
<script nonce="{{ csp_nonce('script') }}">
|
<script nonce="{{ csp_nonce('script') }}">
|
||||||
// Function to initialize the field mapping page
|
// Function to initialize the field mapping page
|
||||||
function initializeFieldMapping() {
|
function initializeFieldMapping() {
|
||||||
const suggestions = {{ suggested_mapping|json_encode|raw }};
|
const suggestions = JSON.parse("{{ suggested_mapping|json_encode|escape('js')}}");
|
||||||
const fieldNameMapping = {{ field_name_mapping|json_encode|raw }};
|
const fieldNameMapping = JSON.parse("{{ field_name_mapping|json_encode|escape('js') }}");
|
||||||
|
|
||||||
Object.keys(suggestions).forEach(function(field) {
|
Object.keys(suggestions).forEach(function(field) {
|
||||||
// Use the sanitized field name from the server-side mapping
|
// Use the sanitized field name from the server-side mapping
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue