NewsPanel: Fixed XSS issue when rendering rss links (#27612)

(cherry picked from commit b58864792d)
This commit is contained in:
Torkel Ödegaard
2020-09-17 10:44:02 +02:00
committed by Hugo Häggmark
parent b112b13c2d
commit eca1c505c7
+1 -1
View File
@@ -77,7 +77,7 @@ export class NewsPanel extends PureComponent<Props, State> {
{news.map((item, index) => {
return (
<div key={index} className={styles.item}>
<a href={item.link} target="_blank">
<a href={textUtil.sanitizeUrl(item.link)} target="_blank">
<div className={styles.title}>{item.title}</div>
<div className={styles.date}>{dateTimeFormat(item.date, { format: 'MMM DD' })} </div>
</a>