Update pages/reader.py
Browse files- pages/reader.py +6 -4
pages/reader.py
CHANGED
|
@@ -31,13 +31,15 @@ st.write(paramx)
|
|
| 31 |
|
| 32 |
filtered_df = df[df['ID'] == paramx]
|
| 33 |
|
|
|
|
|
|
|
| 34 |
if not filtered_df.empty:
|
| 35 |
row = filtered_df.iloc[0]
|
| 36 |
|
| 37 |
-
title = row["Title"]
|
| 38 |
-
author = row.get("Author", "Unknown Author")
|
| 39 |
-
intro = row["Introduction"]
|
| 40 |
-
method = row["Method"]
|
| 41 |
|
| 42 |
html_content = f"""
|
| 43 |
<style>
|
|
|
|
| 31 |
|
| 32 |
filtered_df = df[df['ID'] == paramx]
|
| 33 |
|
| 34 |
+
import html
|
| 35 |
+
|
| 36 |
if not filtered_df.empty:
|
| 37 |
row = filtered_df.iloc[0]
|
| 38 |
|
| 39 |
+
title = html.escape(row["Title"])
|
| 40 |
+
author = html.escape(row.get("Author", "Unknown Author"))
|
| 41 |
+
intro = html.escape(row["Introduction"])
|
| 42 |
+
method = html.escape(row["Method"])
|
| 43 |
|
| 44 |
html_content = f"""
|
| 45 |
<style>
|