Skip to content

Commit

Permalink
Custom Link: Decode value in URL input field (#55549)
Browse files Browse the repository at this point in the history
  • Loading branch information
t-hamano authored and cbravobernal committed Nov 14, 2023
1 parent 80c7e00 commit 452a1f3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/block-library/src/navigation-link/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import {
getColorClassName,
useInnerBlocksProps,
} from '@wordpress/block-editor';
import { isURL, prependHTTP } from '@wordpress/url';
import { isURL, prependHTTP, safeDecodeURI } from '@wordpress/url';
import { useState, useEffect, useRef } from '@wordpress/element';
import {
placeCaretAtHorizontalEdge,
Expand Down Expand Up @@ -432,7 +432,7 @@ export default function NavigationLinkEdit( {
/>
<TextControl
__nextHasNoMarginBottom
value={ url || '' }
value={ url ? safeDecodeURI( url ) : '' }
onChange={ ( urlValue ) => {
updateAttributes(
{ url: urlValue },
Expand Down

0 comments on commit 452a1f3

Please sign in to comment.