From a720c4407012c0fdf9a6016f168ca5900eb61640 Mon Sep 17 00:00:00 2001 From: Brian Fletcher Date: Mon, 22 Aug 2022 20:00:10 +0100 Subject: [PATCH 1/2] unescape html entities from stackoverflow api response Signed-off-by: Brian Fletcher --- .changeset/tender-ladybugs-relax.md | 5 +++++ .../src/home/StackOverflowQuestions/Content.tsx | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 .changeset/tender-ladybugs-relax.md diff --git a/.changeset/tender-ladybugs-relax.md b/.changeset/tender-ladybugs-relax.md new file mode 100644 index 0000000000..94750632e1 --- /dev/null +++ b/.changeset/tender-ladybugs-relax.md @@ -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. diff --git a/plugins/stack-overflow/src/home/StackOverflowQuestions/Content.tsx b/plugins/stack-overflow/src/home/StackOverflowQuestions/Content.tsx index fbc3a90a9d..d562b749b1 100644 --- a/plugins/stack-overflow/src/home/StackOverflowQuestions/Content.tsx +++ b/plugins/stack-overflow/src/home/StackOverflowQuestions/Content.tsx @@ -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) => { {props.icon && {props.icon}} From b3498f8fd827b8e983e2163e0fa72a5b6981538b Mon Sep 17 00:00:00 2001 From: Brian Fletcher Date: Mon, 22 Aug 2022 20:07:42 +0100 Subject: [PATCH 2/2] documentation typos Signed-off-by: Brian Fletcher --- .changeset/tender-ladybugs-relax.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.changeset/tender-ladybugs-relax.md b/.changeset/tender-ladybugs-relax.md index 94750632e1..2aefa09dc0 100644 --- a/.changeset/tender-ladybugs-relax.md +++ b/.changeset/tender-ladybugs-relax.md @@ -2,4 +2,4 @@ '@backstage/plugin-stack-overflow': patch --- -Unescape html entity references from the stackoverflow API response before rendering the question title to the list component. +Support showing HTML entity references from the API response before rendering the question title to the list component.