Skip to content

Commit

Permalink
Remove protocol.
Browse files Browse the repository at this point in the history
  • Loading branch information
sainthkh authored and aduth committed May 18, 2020
1 parent a9ae99c commit 7f1bf39
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import classnames from 'classnames';
/**
* WordPress dependencies
*/
import { safeDecodeURI } from '@wordpress/url';
import { safeDecodeURI, filterURLForDisplay } from '@wordpress/url';
import { __ } from '@wordpress/i18n';
import { Button, TextHighlight } from '@wordpress/components';
import { Icon, globe } from '@wordpress/icons';
Expand Down Expand Up @@ -46,7 +46,11 @@ export const LinkControlSearchItem = ( {
aria-hidden={ ! isURL }
className="block-editor-link-control__search-item-info"
>
{ ! isURL && ( safeDecodeURI( suggestion.url ) || '' ) }
{ ! isURL &&
( filterURLForDisplay(
safeDecodeURI( suggestion.url )
) ||
'' ) }
{ isURL && __( 'Press ENTER to add this link' ) }
</span>
</span>
Expand Down

0 comments on commit 7f1bf39

Please sign in to comment.