From 5aaa00eee595f99ad6ecd0a5958bc1cf0568a6b1 Mon Sep 17 00:00:00 2001 From: Jeremy Ruston Date: Wed, 2 May 2012 17:24:51 +0100 Subject: [PATCH] Temporary fix for link behaviour There will soon be link massager plugins that apply this kind of processing --- rabbithole/core/modules/macros/link.js | 3 +++ 1 file changed, 3 insertions(+) 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) {