json is working!
This commit is contained in:
parent
70876dc123
commit
f5408636c7
1 changed files with 3 additions and 3 deletions
|
|
@ -33,9 +33,9 @@ class Entry(BaseEntry, Scriptable):
|
||||||
def _add_entry_kwargs_to_script(self) -> None:
|
def _add_entry_kwargs_to_script(self) -> None:
|
||||||
# Add entry metadata, but avoid the `.add()` helper since it also adds sanitized
|
# Add entry metadata, but avoid the `.add()` helper since it also adds sanitized
|
||||||
self.unresolvable.remove(VARIABLES.entry_metadata.variable_name)
|
self.unresolvable.remove(VARIABLES.entry_metadata.variable_name)
|
||||||
single_quote = "'"
|
entry_metadata_variable = (
|
||||||
replace_single_quote = "\\'"
|
f"{{%from_json('''{json.dumps(self._kwargs, ensure_ascii=False)}''')}}"
|
||||||
entry_metadata_variable = f"{{%from_json('{json.dumps(self._kwargs, ensure_ascii=False).replace(single_quote, replace_single_quote)}')}}"
|
)
|
||||||
self.script.add({VARIABLES.entry_metadata.variable_name: entry_metadata_variable})
|
self.script.add({VARIABLES.entry_metadata.variable_name: entry_metadata_variable})
|
||||||
self.update_script()
|
self.update_script()
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue