Spaces:
Build error
Build error
Commit
•
3738b3d
1
Parent(s):
d7f16a4
Test html rendering error
Browse files
app.py
CHANGED
@@ -48,11 +48,14 @@ def main() -> None:
|
|
48 |
st.markdown('#####')
|
49 |
replaced_text = html.escape(terms_and_conditions_text)
|
50 |
for sentence in summary_sentences:
|
51 |
-
|
52 |
-
replaced_text = replaced_text.replace(
|
53 |
-
|
|
|
|
|
|
|
54 |
with st.container():
|
55 |
-
st.
|
56 |
|
57 |
def is_valid_url(url: str) -> bool:
|
58 |
result = validators.url(url)
|
|
|
48 |
st.markdown('#####')
|
49 |
replaced_text = html.escape(terms_and_conditions_text)
|
50 |
for sentence in summary_sentences:
|
51 |
+
escaped_sentence = html.escape(sentence)
|
52 |
+
replaced_text = replaced_text.replace(escaped_sentence,
|
53 |
+
f"<p>"
|
54 |
+
f"<span style='background-color: yellow'>{escaped_sentence}</span>"
|
55 |
+
f"</p>")
|
56 |
+
replaced_text = replaced_text.replace('\n', '<br/>')
|
57 |
with st.container():
|
58 |
+
st.write(f"<p>{replaced_text}</p>", unsafe_allow_html=True)
|
59 |
|
60 |
def is_valid_url(url: str) -> bool:
|
61 |
result = validators.url(url)
|