diff --git a/rabbithole/core/modules/macros/link.js b/rabbithole/core/modules/macros/link.js index d1b4c78d9..924f41f81 100644 --- a/rabbithole/core/modules/macros/link.js +++ b/rabbithole/core/modules/macros/link.js @@ -56,6 +56,9 @@ exports.executeMacro = function() { linkInfo.attributes = { href: linkInfo.to }; + if(!linkInfo.isExternal) { + linkInfo.attributes.href = encodeURIComponent(linkInfo.to); + } // Generate the default classes for the link linkInfo.attributes["class"] = ["tw-tiddlylink"]; if(linkInfo.isExternal) {