diff --git a/components/CopyMenu.js b/components/CopyMenu.js index 5bfd816..fe32105 100644 --- a/components/CopyMenu.js +++ b/components/CopyMenu.js @@ -19,7 +19,9 @@ const toIFrame = (url, width, height) => ` const toURL = url => `${location.origin}${url}` -const toEncodedURL = morph.compose(encodeURI, toURL) +// Medium does not handle asterisks correctly - https://github.com/carbon-app/carbon/issues/1067 +const replaceAsterisks = string => string.replace(/\*/g, '%2A') +const toEncodedURL = morph.compose(encodeURI, replaceAsterisks, toURL) function CopyButton(props) { return (