1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-11-19 16:24:51 +00:00

Temporary fix for link behaviour

There will soon be link massager plugins that apply this kind of
processing
This commit is contained in:
Jeremy Ruston 2012-05-02 17:24:51 +01:00
parent d126605479
commit 5aaa00eee5

View File

@ -56,6 +56,9 @@ exports.executeMacro = function() {
linkInfo.attributes = { linkInfo.attributes = {
href: linkInfo.to href: linkInfo.to
}; };
if(!linkInfo.isExternal) {
linkInfo.attributes.href = encodeURIComponent(linkInfo.to);
}
// Generate the default classes for the link // Generate the default classes for the link
linkInfo.attributes["class"] = ["tw-tiddlylink"]; linkInfo.attributes["class"] = ["tw-tiddlylink"];
if(linkInfo.isExternal) { if(linkInfo.isExternal) {