jiphy
jiphy copied to clipboard
single-quotes inside strings
It seems jiphy
does not escape quotes in strings properly. Is this correct?
I'm using jiphy
inside Python code (to.python()
and to.javascript()
methods).
Example in Python:
some_dict = {"name": "AppWrapper.some_function(var_name='Some_Var_Name')"}
Then this dict gets translated to JS with:
jiphy.to.javascript(repr(some_dict))
And the result is:
{'name': 'AppWrapper.read_env_var(var_name='Some_Var_Name')'}
which is invalid, because browser will interpret the inside quotes as starting a new string which is not the case.
Any solutions barring regexing it?