Skip to content

Commit

Permalink
fix html encoded entity in code example and article cards (github#22328)
Browse files Browse the repository at this point in the history
  • Loading branch information
mikesurowiec authored Oct 25, 2021
1 parent bf9963f commit 3fbda10
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion components/landing/CodeExampleCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,10 @@ export const CodeExampleCard = ({ example }: Props) => {
>
<div className="p-4">
<h4 dangerouslySetInnerHTML={{ __html: example.title }} />
<p className="mt-2 mb-4 color-text-tertiary">{example.description}</p>
<p
className="mt-2 mb-4 color-text-tertiary"
dangerouslySetInnerHTML={{ __html: example.description }}
/>
<div className="d-flex flex-wrap">
{example.tags.map((tag) => {
return (
Expand Down
2 changes: 1 addition & 1 deletion components/sublanding/ArticleCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export const ArticleCard = ({ card, typeLabel }: Props) => {
<div className="h6 text-uppercase" data-testid="article-card-type">
{typeLabel}
</div>
<p className="color-text-secondary my-3">{card.intro}</p>
<p className="color-text-secondary my-3" dangerouslySetInnerHTML={{ __html: card.intro }} />
{card.topics.length > 0 && (
<div>
{card.topics.map((topic) => {
Expand Down

0 comments on commit 3fbda10

Please sign in to comment.