ArunK-2003 commited on
Commit
6b96615
·
verified ·
1 Parent(s): 41c51bb

Updated app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -425,7 +425,8 @@ else:
425
  st.session_state.comments = []
426
 
427
  def add_comment(comment):
428
- st.session_state.comments.append({"name": "", "comment": comment, "date": datetime.now().strftime("%d, %b %Y")})
 
429
 
430
  if 'name' not in st.session_state:
431
  st.session_state.name = ""
 
425
  st.session_state.comments = []
426
 
427
  def add_comment(comment):
428
+ sanitized_comment = html.escape(comment)
429
+ st.session_state.comments.append({"name": "", "comment": sanitized_comment, "date": datetime.now().strftime("%d, %b %Y")})
430
 
431
  if 'name' not in st.session_state:
432
  st.session_state.name = ""