Thank you! I managed to get it to work, then had to abandon it. I was
adding it to CSS classnames and ids.
The output didn't encode single quotes, which broke CSS naming or something.
I would still like to know though, is there a way to force the
single-quotes to be encoded?
Escaping them doesn't seem to work for CSS too.
On Wednesday, 22 May 2019 18:25:05 UTC+8, TonyM wrote:
>
> Dustan,
>
> Use the variable you created with the vars?
>
> <$vars titleName={{{ [<currentTiddler>] +[encodeuri[]] }}}>
>
> <a href=<<titleName>> >Link</a>
> </$vars>
>
>
> Tony
>
> On Wednesday, May 22, 2019 at 4:28:56 PM UTC+10, Dunstan Hume wrote:
>>
>> Thank you, that helped me a bit to understand. I still couldn't make it
>> work anywhere in any of my codes. Is it possible to put it in $vars?
>>
>> <$vars titleName={{{ [<currentTiddler>] +[encodeuri[]] }}}>
>> <a href="$titleName$">Link</a>
>> </$vars>
>>
>> Can't seem to get it right.
>>
>> On Wednesday, 22 May 2019 10:46:48 UTC+8, Mark S. wrote:
>>>
>>>
>>>
>>> You can display the title like this:
>>>
>>> {{{ [<currentTiddler>] +[encodeuri[]] }}}
>>>
>>> "encodeuri" has to be invoked inside a filter. Triple {{{ }}} brackets
>>> are one way of doing that. But you may have had something else in mind.
>>>
>>> Good luck!
>>>
>>> On Tuesday, May 21, 2019 at 6:40:14 PM UTC-7, Dunstan Hume wrote:
>>>>
>>>> Hello, I've been trying for hours and I can't seem to get my macro
>>>> working
>>>>
>>>> \define encodeTitleString(text)
>>>> [[$(currentTiddler)$]] +[encodeuri[]]
>>>> \end
>>>>
>>>> How do I get it to get the title of the current tiddler, then spit out
>>>> the encoded string?
>>>>
>>>
>>>
--
You received this message because you are subscribed to the Google Groups
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit
https://groups.google.com/d/msgid/tiddlywiki/8d6289f9-63f3-4191-bd26-1e9898ba1505%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.