Skip to content

Commit

Permalink
html encode the text of logbox_append()
Browse files Browse the repository at this point in the history
  • Loading branch information
wang0618 authored May 30, 2022
1 parent 7d686fb commit 2d1ce0c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pywebio_battery/interaction.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,4 +136,4 @@ def put_logbox(name, height=400, keep_bottom=True) -> Output:

def logbox_append(name, text):
"""Append text to a logbox widget"""
run_js('$("#webio-logbox-%s").append(text)' % name, text=str(text))
run_js('$("#webio-logbox-%s").append(document.createTextNode(text))' % name, text=str(text))

0 comments on commit 2d1ce0c

Please sign in to comment.