Discussion:
[tw5] Double Straight Quotation Marks in Tiddler Titles Used as Tags
(too old to reply)
Scott Simmons (Secret-HQ)
2018-10-29 08:50:49 UTC
Permalink
Hi, all —

I've just realized tiddlers with titles wrapped in double straight
quotation marks yield problems when those titles are used as tags. To my
surprise, there's no issue when the quotation marks appear in certain
places in the title string, just when they crop up at the *END* of the
string.

Here are some examples:
http://tiddlywiki.secret-hq.com/testing/QuotationMarksTags.html

Is this a known bug with the *tag-pill-inner* macro? It's taken me a while
to notice it, and a quick search didn't yield any information on it.
--
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 tiddlywiki+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
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/a16f4be4-2291-4bbe-b3c1-586576822679%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
TonyM
2018-10-29 11:44:40 UTC
Permalink
Scott,

actions=/> looks broken.

Using a delimiter in tittles is not wise, but if you must everywhere you reference them you mayneed to wrap them in tripple double quotes eg
"""My title "containing a quote" """

Regards
Tony
--
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 tiddlywiki+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
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/1d64ec4c-d929-4a0d-b210-6667840ed80a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Scott Simmons (Secret-HQ)
2018-10-30 00:30:32 UTC
Permalink
Definitely not the safest practice, Tony!

In my (half-hearted) defense, it's a practice I've had for a loonnnng while
(so I have a lot of bad-habit inertia), and quotation marks aren't on the
official verboten list:

<Loading Image...>
😇

My workaround for the moment has been to search-and-replace quote pairs in
titles with “smart quotes,” which don't have the same issue.

Maybe this is an easy enough fix in the next version of the core, though
it's hard to believe I'm the first in all this time to stumble across it
and report it.
--
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 tiddlywiki+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
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/da6ec83c-9dd1-4748-b75e-bab855691232%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
TonyM
2018-10-30 00:47:59 UTC
Permalink
Scott,

Did I say I was not also guilty of the same thing?, No I have done such
things, Don't get me wrong, you can do this, the only thing is you can no
longer assume that titles will not contain quotes, so you need to write
wikitext that can handle it like with triple quotes.

The fact is we could be writing wiki text that handles any level of quotes
in titles however we naturally seem to code a minimal amount. eg
value=field-name, value="value with space".

Its andexample of the old saying ”To Assume, us to make an *Ass* out of *U*
and *Me*"

I have noticed recently cases where I must use double-quotes on system
tiddler names eg value="
<file:///C:/Data/TW5/Instances/PSaTSuitnew.html#%24%3A%2FPSaT%2FPinned%2FJournal>*$:/PSaT/Pinned/Journal
<file:///C:/Data/TW5/Instances/PSaTSuitnew.html#%24%3A%2FPSaT%2FPinned%2FJournal>"* or
it may not be read correctly, and the truth be known, my learning of
TiddlyWiki was lengthened by my not developing healthy standard practices
around this. I dont know how many times I did this value="<<macro-name>>"
which does not work, rather than
value=<<macro-name>>

where it already is delimited by
<< >>

Arghhh

Regards
Tony


On Tuesday, October 30, 2018 at 11:30:32 AM UTC+11, Scott Simmons
Post by Scott Simmons (Secret-HQ)
Definitely not the safest practice, Tony!
In my (half-hearted) defense, it's a practice I've had for a loonnnng
while (so I have a lot of bad-habit inertia), and quotation marks aren't on
<http://tiddlywiki.secret-hq.com/images/screenshots/TiddlyWiki5_ForbiddenCharactersInTitles.png>
😇
My workaround for the moment has been to search-and-replace quote pairs in
titles with “smart quotes,” which don't have the same issue.
Maybe this is an easy enough fix in the next version of the core, though
it's hard to believe I'm the first in all this time to stumble across it
and report it.
--
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 tiddlywiki+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
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/5ba20b51-b84c-45c7-88e6-a244e1bc3809%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
'Mark S.' via TiddlyWiki
2018-10-30 01:07:15 UTC
Permalink
There is some new wikitext that can fix this problem, if you're anxious.

Edit $:/core/macros/tag and replace """$tag$""" with <<__tag__>> in the
first two macros

Like:

\define
tag-pill-inner(tag,icon,colour,fallbackTarget,colourA,colourB,element-tag,element-attributes,actions)
<$vars foregroundColor=<<contrastcolour target:"""$colour$"""
fallbackTarget:"""$fallbackTarget$""" colourA:"""$colourA$"""
colourB:"""$colourB$""">> backgroundColor="""$colour$""">
<$element-tag$ $element-attributes$ class="tc-tag-label tc-btn-invisible"
style=<<tag-pill-styles>>>
$actions$<$transclude tiddler="""$icon$"""/> <$view tiddler=<<__tag__>>
field="title" format="text" />
</$element-tag$>
</$vars>
\end

\define
tag-pill-body(tag,icon,colour,palette,element-tag,element-attributes,actions)
<$macrocall $name="tag-pill-inner" tag=<<__tag__>> icon="""$icon$"""
colour="""$colour$""" fallbackTarget={{$palette$##tag-background}}
colourA={{$palette$##foreground}} colourB={{$palette$##background}}
element-tag="""$element-tag$"""
element-attributes="""$element-attributes$""" actions="""$actions$"""/>
\end

I'm not sure if you need (or should) replace """$tag$""" everywhere that it
appears in that tiddler, but changing it in those two locations was enough
to fix your example pages.

Well, it fixed their appearance. If you click on them, it still reveals
code. To fix that, you need to
go to $:/core/macros/list and make a similar change in
list-tagged-draggable to the set widget.

If you try these changes, be sure to make backups. Though, since they're
shadow tiddlers, you can always "delete" the tiddler you edited and start
over. Assuming it isn't so broke that you can't get in.

I imagine it would be an afternoon's project to track down all the places
that could use this transformation.

Have fun,
-- Mark




Good luck!

-- Mark
--
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 tiddlywiki+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
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/1769941d-1108-450f-b8fe-5e7c7ce780c7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
TonyM
2018-10-30 02:00:02 UTC
Permalink
Mark

Very nice, perhaps this could be a core update?

Tony
Post by 'Mark S.' via TiddlyWiki
There is some new wikitext that can fix this problem, if you're anxious.
Edit $:/core/macros/tag and replace """$tag$""" with <<__tag__>> in the
first two macros
\define
tag-pill-inner(tag,icon,colour,fallbackTarget,colourA,colourB,element-tag,element-attributes,actions)
<$vars foregroundColor=<<contrastcolour target:"""$colour$"""
fallbackTarget:"""$fallbackTarget$""" colourA:"""$colourA$"""
colourB:"""$colourB$""">> backgroundColor="""$colour$""">
<$element-tag$ $element-attributes$ class="tc-tag-label tc-btn-invisible"
style=<<tag-pill-styles>>>
$actions$<$transclude tiddler="""$icon$"""/> <$view tiddler=<<__tag__>>
field="title" format="text" />
</$element-tag$>
</$vars>
\end
\define
tag-pill-body(tag,icon,colour,palette,element-tag,element-attributes,actions)
<$macrocall $name="tag-pill-inner" tag=<<__tag__>> icon="""$icon$"""
colour="""$colour$""" fallbackTarget={{$palette$##tag-background}}
colourA={{$palette$##foreground}} colourB={{$palette$##background}}
element-tag="""$element-tag$"""
element-attributes="""$element-attributes$""" actions="""$actions$"""/>
\end
I'm not sure if you need (or should) replace """$tag$""" everywhere that
it appears in that tiddler, but changing it in those two locations was
enough to fix your example pages.
Well, it fixed their appearance. If you click on them, it still reveals
code. To fix that, you need to
go to $:/core/macros/list and make a similar change in
list-tagged-draggable to the set widget.
If you try these changes, be sure to make backups. Though, since they're
shadow tiddlers, you can always "delete" the tiddler you edited and start
over. Assuming it isn't so broke that you can't get in.
I imagine it would be an afternoon's project to track down all the places
that could use this transformation.
Have fun,
-- Mark
Good luck!
-- Mark
--
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 tiddlywiki+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
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/ec354943-46c2-45f0-99a6-c8d1301e9ba1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
BurningTreeC
2018-10-30 09:27:02 UTC
Permalink
Hey all,

I've made a Pull Request for this problem some time ago:
https://github.com/Jermolene/TiddlyWiki5/pull/3437

I Made other Pull Requests fixing the list-tagged-draggable macros and the
TagManager for tags like these:

https://github.com/Jermolene/TiddlyWiki5/pull/3442

https://github.com/Jermolene/TiddlyWiki5/pull/3440

BTC
--
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 tiddlywiki+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
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/c24c9ba2-1e42-4d16-91f3-0930618c98e6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Scott Simmons (Secret-HQ)
2018-12-11 02:27:53 UTC
Permalink
Ask and ye shall receive! (Or "make a pull request and it shall ship" in
this case?) This behavior has been addressed and corrected for in version
5.1.18.

Thanks, @TonyM, for pointing out the gremlin; @Mark S., for the core
workaround/fix; and @BurningTreeC for keeping up with this and GitHubifying
the interest in your earlier pull request.
--
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 tiddlywiki+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
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/5625327c-8718-4771-8b93-b7f99327f33c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Loading...