Skip to content

Commit

Permalink
Merge pull request #123 from wpmudev/fix/SUI-199
Browse files Browse the repository at this point in the history
πŸ› fix(react-post): Decode post title.
  • Loading branch information
iamleigh authored Jun 17, 2021
2 parents f3edb6c + ab845d7 commit 93eb07a
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions packages/react-post/lib/react-post.js
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,12 @@ export class Post extends Component {
{PostImage}

{this.props.title && "" !== this.props.title && (
<PostTitle banner>{this.props.title}</PostTitle>
<PostTitle
banner
dangerouslySetInnerHTML={{
__html: this.props.title
}}
/>
)}

{this.props.excerpt && "" !== this.props.excerpt && (
Expand Down Expand Up @@ -325,7 +330,11 @@ export class Post extends Component {
flex: 1
}}>
{this.props.title && "" !== this.props.title && (
<PostTitle>{this.props.title}</PostTitle>
<PostTitle
dangerouslySetInnerHTML={{
__html: this.props.title
}}
/>
)}
{this.props.time && "" !== this.props.time && (
<PostTime>
Expand Down

0 comments on commit 93eb07a

Please sign in to comment.