Dmitry Beresnev
commited on
Commit
·
bb8a8a0
1
Parent(s):
a975122
fix news feed
Browse files- app/components/news.py +3 -3
app/components/news.py
CHANGED
|
@@ -3,7 +3,7 @@
|
|
| 3 |
import streamlit as st
|
| 4 |
import pandas as pd
|
| 5 |
from datetime import datetime
|
| 6 |
-
import html
|
| 7 |
|
| 8 |
|
| 9 |
def display_news_card(news_item: dict):
|
|
@@ -81,7 +81,7 @@ def display_news_card(news_item: dict):
|
|
| 81 |
<!-- Title -->
|
| 82 |
<h3 style='color: #f3f4f6; margin: 0 0 12px 0; font-size: 17px;
|
| 83 |
line-height: 1.5; font-weight: 600;'>
|
| 84 |
-
{
|
| 85 |
</h3>
|
| 86 |
|
| 87 |
<!-- Meta info -->
|
|
@@ -245,7 +245,7 @@ def display_breaking_news_banner(df: pd.DataFrame):
|
|
| 245 |
BREAKING NEWS • {latest['source'].upper()}
|
| 246 |
</div>
|
| 247 |
<div style='color: white; font-size: 18px; font-weight: 600; line-height: 1.4;'>
|
| 248 |
-
{
|
| 249 |
</div>
|
| 250 |
</div>
|
| 251 |
<a href='{latest['url']}' target='_blank'
|
|
|
|
| 3 |
import streamlit as st
|
| 4 |
import pandas as pd
|
| 5 |
from datetime import datetime
|
| 6 |
+
import html as html_module
|
| 7 |
|
| 8 |
|
| 9 |
def display_news_card(news_item: dict):
|
|
|
|
| 81 |
<!-- Title -->
|
| 82 |
<h3 style='color: #f3f4f6; margin: 0 0 12px 0; font-size: 17px;
|
| 83 |
line-height: 1.5; font-weight: 600;'>
|
| 84 |
+
{html_module.escape(news_item['summary'])}
|
| 85 |
</h3>
|
| 86 |
|
| 87 |
<!-- Meta info -->
|
|
|
|
| 245 |
BREAKING NEWS • {latest['source'].upper()}
|
| 246 |
</div>
|
| 247 |
<div style='color: white; font-size: 18px; font-weight: 600; line-height: 1.4;'>
|
| 248 |
+
{html_module.escape(latest['summary'])}
|
| 249 |
</div>
|
| 250 |
</div>
|
| 251 |
<a href='{latest['url']}' target='_blank'
|