Skip to content

Commit

Permalink
Document Settings: Decode post URL for the button label (#42930)
Browse files Browse the repository at this point in the history
  • Loading branch information
Mamaduka authored Aug 8, 2022
1 parent 54c9d81 commit f0eb918
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/editor/src/components/post-url/label.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* WordPress dependencies
*/
import { useSelect } from '@wordpress/data';
import { filterURLForDisplay } from '@wordpress/url';
import { filterURLForDisplay, safeDecodeURIComponent } from '@wordpress/url';

/**
* Internal dependencies
Expand All @@ -18,5 +18,5 @@ export function usePostURLLabel() {
( select ) => select( editorStore ).getCurrentPost().link,
[]
);
return filterURLForDisplay( postLink );
return filterURLForDisplay( safeDecodeURIComponent( postLink ) );
}

0 comments on commit f0eb918

Please sign in to comment.