diff --git a/packages/block-editor/src/components/link-control/search-item.js b/packages/block-editor/src/components/link-control/search-item.js index e90a31ec35072..a7ef58e36d491 100644 --- a/packages/block-editor/src/components/link-control/search-item.js +++ b/packages/block-editor/src/components/link-control/search-item.js @@ -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'; @@ -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' ) }