Is this a bug: external link to a Tiddlywiki Tiddler with special characters in title

34 views
Skip to first unread message

Mohammad

unread,
Mar 4, 2020, 12:41:49 AM3/4/20
to TiddlyWiki

I am trying to generate a link to a tiddler in Tiddlywiki.com programmatically!

The tiddler title is: Hidden Setting: New-Image Type
The title has colon (:).

I used something link this

\define theLink() [ext[$(currentTiddler)$]]

<$list filter="[[Hidden Setting: New-Image Type]addprefix[https://tiddlywiki.com/#]]">
<<theLink>>
</$list>


It does not work!

I also tried as below

<a href={{{ [[Hidden Setting: New-Image Type]addprefix[https://tiddlywiki.com/#]]+[encodeuri[]] }}} target="_blank">
Go</a>

It fails again!

If I was NOT wrong, Tiddlywiki uses the colon (:) after the first # to create a story of tiddlers (e.g. permview of several tiddlers opened in story river)

  • Ugly solution
I know, it possible to encode every colon(:) in title as below and then the code work  (colon : encodes to %3A see:https://www.w3schools.com/tags/ref_urlencode.ASP)

\define theLink() [ext[$(currentTiddler)$]]

<$list filter="[[Hidden Setting: New-Image Type]split[:]join[%3A]addprefix[https://tiddlywiki.com/#]]">
<<theLink>>
</$list>


  • Worst solution

<$list filter="[[Hidden Setting: New-Image Type]]"> 
<a href=<<theLink>> target="_blanl">Go</a>
</$list>


NOTE: Examples only shows how programmatically the issue occurs otherwise, the filter creates many tiddlers...


What do you propose?


--Mohammad

p.s: I do not believe to solve an issue in any way! A semantic code and a simple solution is always is a better solution

Mat

unread,
Mar 4, 2020, 1:17:29 AM3/4/20
to TiddlyWiki
This seems to work

<$list filter="[[Hidden Setting: New-Image Type]encodeuri[]split[:]join[%3A]addprefix[https://tiddlywiki.com/#]]">
<
<theLink>>
</$list>

<:-)
Reply all
Reply to author
Forward
0 new messages