mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
NewsPanel: Fixed XSS issue when rendering rss links (#27612)
This commit is contained in:
parent
58124efdb5
commit
b58864792d
@ -77,7 +77,7 @@ export class NewsPanel extends PureComponent<Props, State> {
|
|||||||
{news.map((item, index) => {
|
{news.map((item, index) => {
|
||||||
return (
|
return (
|
||||||
<div key={index} className={styles.item}>
|
<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.title}>{item.title}</div>
|
||||||
<div className={styles.date}>{dateTimeFormat(item.date, { format: 'MMM DD' })} </div>
|
<div className={styles.date}>{dateTimeFormat(item.date, { format: 'MMM DD' })} </div>
|
||||||
</a>
|
</a>
|
||||||
|
Loading…
Reference in New Issue
Block a user