From ec6ea4c562cc1e8532d0303a009278ce19fe6b5a Mon Sep 17 00:00:00 2001 From: Addison Stavlo Date: Wed, 15 Jan 2020 17:24:16 -0500 Subject: [PATCH] Fix Navigation Link url escaping (#19679) * pass url through escape function * replace escape with encodeURI --- packages/block-library/src/navigation-link/edit.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/block-library/src/navigation-link/edit.js b/packages/block-library/src/navigation-link/edit.js index 85979df833df82..aa98feeace79d3 100644 --- a/packages/block-library/src/navigation-link/edit.js +++ b/packages/block-library/src/navigation-link/edit.js @@ -176,7 +176,7 @@ function NavigationLinkEdit( { opensInNewTab: newOpensInNewTab, } = {} ) => setAttributes( { title: escape( newTitle ), - url: newURL, + url: encodeURI( newURL ), label: label || escape( newTitle ), opensInNewTab: newOpensInNewTab, } ) }