1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-11-09 11:29:58 +00:00
TiddlyWiki5/core/ui/EditTemplate
FlashSystems 80442b7f7f
Fix for bug #7054 (#7092)
* Fix Bug #7054: Reuse of $:/core/ui/EditTemplate/fields broken

This fixes Bug #7054 by creating a new variable
`safeNewFieldValueTiddlerPrefix` that is always set to a valid,
temporary prefix. This variable is used within `$action-deletetiddler`.
If the passed `newFieldValueTiddlerPrefix` variable is empty a new
prefix will be generated by the same logic that creates the original
`newFieldValueTiddlerPrefix` variable.

To be even more defensive, the prefix-filter was prepended with another
prefix filter that limits matches to `$:/temp/NewFieldValue`. This
prevents a bogus but non empty value in `newFieldValueTiddlerPrefix`
to delete arbitrary tiddlers.

* Add a default for `newFieldValueTiddlerPrefix`

This fixes a problem that was identified while fixing bug #7054. If the
tiddler `$:/core/ui/EditTemplate/fields` is transcluded directly and
`newFieldValueTiddlerPrefix` is not set, it will be generated. This
makes sure that this value is defined. It can not be redefined
unconditionally because if this tiddler is transcluded from
`EditTemplate.tid` these two tiddlers must agree on the same prefix
because the clean-up is duplicated between `EditTemplate.tid` and
`fields.tid`.

This would make `safeNewFieldValueTiddlerPrefix` obsolete, but I leave
it in there to make the macros safe and prevent any problems if the
`newFieldValueTiddlerPrefix` is unset by a later change.
2022-12-05 22:05:20 +00:00
..
body Add data-tags and data-tiddler-title attributes to preview area (#6939) 2022-11-14 17:48:00 +00:00
Preview Use view template body cascade for the default preview 2022-09-10 11:01:29 +01:00
body-editor.tid Trim Saga: Edit and View templates (#6276) 2022-03-26 14:16:01 +00:00
body-toolbar-button.tid Add support for disabled editor toolbar buttons & docs (#5294) 2021-04-25 16:17:32 +01:00
body.tid Cascades: Ignore draft configuration tiddlers 2021-12-06 16:25:51 +00:00
controls.tid Trim Saga: Edit and View templates (#6276) 2022-03-26 14:16:01 +00:00
fieldEditor-default.tid Fix for Bug #6618 (#6628) 2022-05-14 13:30:04 +01:00
fields.tid Fix for bug #7054 (#7092) 2022-12-05 22:05:20 +00:00
shadow.tid Trim Saga: Edit and View templates (#6276) 2022-03-26 14:16:01 +00:00
tags.tid Cascades: Ignore draft configuration tiddlers 2021-12-06 16:25:51 +00:00
title.tid Trim Saga: Edit and View templates (#6276) 2022-03-26 14:16:01 +00:00
type.tid Edit type dropdown: Add whitespace between description and MIME type 2021-12-08 21:25:44 +00:00