How to use the @wordpress/url.safeDecodeURI function in @wordpress/url

To help you get started, we’ve selected a few @wordpress/url examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github WordPress / gutenberg / packages / block-editor / src / components / link-control / search-item.js View on Github external
onClick={ onClick }
			className={ classnames( 'block-editor-link-control__search-item', {
				'is-selected': isSelected,
				'is-url': isURL,
				'is-entity': ! isURL,
			} ) }
		>
			{ isURL && (
				
			) }
			<span>
				<span>
					
				</span>
				<span aria-hidden="{">
					{ ! isURL &amp;&amp; ( safeDecodeURI( suggestion.url ) || '' ) }
					{ isURL &amp;&amp; (
						__( 'Press ENTER to add this link' )
					) }
				</span>
			</span>
			{ suggestion.type &amp;&amp; (
				<span>{ suggestion.type }</span>
			) }
		
	);
};
github WordPress / gutenberg / packages / editor / src / components / post-permalink / index.js View on Github external
label={ ariaLabel }
					onCopy={ () =&gt; this.setState( { isCopied: true } ) }
					aria-disabled={ isCopied }
					icon="admin-links"
				/&gt;

				<span>{ __( 'Permalink:' ) }</span>

				{ ! isEditingPermalink &amp;&amp;
					 this.linkElement = linkElement }
					&gt;
						{ safeDecodeURI( samplePermalink ) }
						‎
					
				}

				{ isEditingPermalink &amp;&amp;
					 this.setState( { isEditingPermalink: false } ) }
					/&gt;
				}

				{ isEditable &amp;&amp; ! isEditingPermalink &amp;&amp;
					<button> this.setState( { isEditingPermalink: true } ) }</button>