From 9e3c2336860672cd8c6364ecdec7321ef265b956 Mon Sep 17 00:00:00 2001 From: "jeremy@jermolene.com" Date: Mon, 23 May 2022 08:56:10 +0100 Subject: [PATCH] Add some warnings about the dangers of title lists --- editions/tw5.com/tiddlers/concepts/Title List.tid | 5 ++++- editions/tw5.com/tiddlers/filters/format.tid | 4 +++- editions/tw5.com/tiddlers/widgets/SetWidget.tid | 4 +++- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/editions/tw5.com/tiddlers/concepts/Title List.tid b/editions/tw5.com/tiddlers/concepts/Title List.tid index d9bbe8412..a49a665ad 100644 --- a/editions/tw5.com/tiddlers/concepts/Title List.tid +++ b/editions/tw5.com/tiddlers/concepts/Title List.tid @@ -1,7 +1,8 @@ created: 20150117152418000 -modified: 20150124205659000 +modified: 20220523075540462 tags: Concepts title: Title List +type: text/vnd.tiddlywiki A <<.def "title list">> is a line of text that presents one or more tiddler titles, strung together with a space between each one and the next. @@ -12,3 +13,5 @@ If a title <<.em contains>> a space, it needs double square brackets around it: Title lists are used in various places, including PermaLinks and the ListField. They are in fact the simplest case of a [[filter|Filters]], and are thus a way of expressing a [[selection of titles|Title Selection]]. + +<<.warning """The [[Title List]] format cannot reliably represent items that contain certain specific character sequences such as `]] `. Thus it should not be used where there is a possibility of such sequences occurring.""">> diff --git a/editions/tw5.com/tiddlers/filters/format.tid b/editions/tw5.com/tiddlers/filters/format.tid index 138eb018f..9cc846139 100644 --- a/editions/tw5.com/tiddlers/filters/format.tid +++ b/editions/tw5.com/tiddlers/filters/format.tid @@ -1,6 +1,6 @@ caption: format created: 20201020100834443 -modified: 20210524090002126 +modified: 20220523075550449 op-input: a [[selection of titles|Title Selection]] op-output: input strings formatted according to the specified suffix <<.place B>> op-parameter: optional format string for the formats @@ -21,4 +21,6 @@ The suffix <<.place B>> is one of the following supported string formats: |^`relativedate` |The input string is interpreted as a UTC date and displayed as the interval from the present instant. Any operator parameters are ignored. | |^`titlelist` |<<.from-version "5.2.0">>The input string wrapped in double square brackets if it contains a space. Appropriate for use in a [[title list|Title List]]. | +<<.warning """The [[Title List]] format cannot reliably represent items that contain certain specific character sequences such as `]] `. Thus it should not be used where there is a possibility of such sequences occurring.""">> + <<.operator-examples "format">> diff --git a/editions/tw5.com/tiddlers/widgets/SetWidget.tid b/editions/tw5.com/tiddlers/widgets/SetWidget.tid index 12ed35176..fe05e8faa 100644 --- a/editions/tw5.com/tiddlers/widgets/SetWidget.tid +++ b/editions/tw5.com/tiddlers/widgets/SetWidget.tid @@ -1,6 +1,6 @@ caption: set created: 20131115182700000 -modified: 20210505095640228 +modified: 20220523075522407 tags: Widgets title: SetWidget type: text/vnd.tiddlywiki @@ -71,6 +71,8 @@ src="""<$set name="myVariable" filter="[all[current]field:title[myMagicTitle]]" This form of the set variable widget evaluates the filter and assigns the result to the variable as a space-separated list (using double square brackets for titles containing spaces). +<<.warning """The [[Title List]] format cannot reliably represent items that contain certain specific character sequences such as `]] `. Thus it should not be used where there is a possibility of such sequences occurring.""">> + <<< <$macrocall $name='wikitext-example-without-html'