Skip to content

Commit

Permalink
Correctly escape code in panel convert (#6595)
Browse files Browse the repository at this point in the history
  • Loading branch information
philippjfr authored Mar 27, 2024
1 parent dbdf5af commit b4b5f93
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion panel/io/convert.py
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ def script_to_html(
if css_resources == 'auto':
css_resources = []
env_spec = ', '.join([repr(req) for req in reqs])
code = code.replace('`', '\`').replace('\\n', r'\\n')
code = code.encode("unicode_escape").decode("utf-8").replace('`', '\`')
if runtime == 'pyodide-worker':
if js_resources == 'auto':
js_resources = []
Expand Down

0 comments on commit b4b5f93

Please sign in to comment.