unescape html entities from stackoverflow api response
Signed-off-by: Brian Fletcher <brian@roadie.io>
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/plugin-stack-overflow': patch
|
||||
---
|
||||
|
||||
Unescape html entity references from the stackoverflow API response before rendering the question title to the list component.
|
||||
@@ -26,6 +26,7 @@ import {
|
||||
} from '@material-ui/core';
|
||||
import OpenInNewIcon from '@material-ui/icons/OpenInNew';
|
||||
import useAsync from 'react-use/lib/useAsync';
|
||||
import _unescape from 'lodash/unescape';
|
||||
import qs from 'qs';
|
||||
import React from 'react';
|
||||
import {
|
||||
@@ -73,7 +74,7 @@ export const Content = (props: StackOverflowQuestionsContentProps) => {
|
||||
<ListItem key={question.link}>
|
||||
{props.icon && <ListItemIcon>{props.icon}</ListItemIcon>}
|
||||
<ListItemText
|
||||
primary={question.title}
|
||||
primary={_unescape(question.title)}
|
||||
secondary={getSecondaryText(question.answer_count)}
|
||||
/>
|
||||
<ListItemSecondaryAction>
|
||||
|
||||
Reference in New Issue
Block a user