From 48f03f89f9a7b01805fab505bb73acde5a26504a Mon Sep 17 00:00:00 2001 From: "Bobby Abellana (aider)" Date: Tue, 18 Feb 2025 09:44:55 -0800 Subject: [PATCH] fix: Escape backticks in error text using Unicode sequence --- src/streamlit_app.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/streamlit_app.py b/src/streamlit_app.py index 2378779..ec37a4e 100644 --- a/src/streamlit_app.py +++ b/src/streamlit_app.py @@ -526,11 +526,14 @@ if st.session_state.error_log: copy_button = st.button("Copy Error Log") if copy_button: # Create a JavaScript function to copy the text + # Escape any backticks in the error text first + escaped_error_text = error_text.replace('`', '\u0060') + js_code = f"""