Skip to content

Commit

Permalink
UrlInput: Decode Post Title special chars
Browse files Browse the repository at this point in the history
  • Loading branch information
youknowriad committed Dec 28, 2017
1 parent 553ab2c commit 3a3c3d5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions blocks/url-input/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import scrollIntoView from 'dom-scroll-into-view';
*/
import { __, sprintf, _n } from '@wordpress/i18n';
import { Component } from '@wordpress/element';
import { keycodes } from '@wordpress/utils';
import { keycodes, decodeEntities } from '@wordpress/utils';
import { Spinner, withInstanceId, withSpokenMessages } from '@wordpress/components';

const { UP, DOWN, ENTER } = keycodes;
Expand Down Expand Up @@ -220,7 +220,7 @@ class UrlInput extends Component {
onClick={ () => this.selectLink( post.link ) }
aria-selected={ index === selectedSuggestion }
>
{ post.title.rendered || __( '(no title)' ) }
{ decodeEntities( post.title.rendered ) || __( '(no title)' ) }
</button>
) ) }
</div>
Expand Down

0 comments on commit 3a3c3d5

Please sign in to comment.