Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] AdvancedSearch Filter dropdown renders wikilinks in descriptions #7017

Closed
ericshulman opened this issue Oct 30, 2022 · 0 comments
Closed

Comments

@ericshulman
Copy link

ericshulman commented Oct 30, 2022

Describe the bug

If a custom filter description field contains a WikiWord (e.g., "WikiWord description here"), then the dropdown list in $:/AdvancedSearch Filters will render the WikiWord, resulting in a two-line list item with an erroneous link.

Expected behavior

filter descriptions containing WikiWords should render as regular text without creating an unintended link within the droplist

To Reproduce

  1. Create a tiddler (e.g., "TestFilter"), tagged with $:/tags/Filter
  2. Add a field named "description" containing "WikiWord description here"
  3. Add a field named "filter" containing any valid filter syntax (e.g, [all[tiddlers]])
  4. Open $:/AdvancedSearch > Filter tab
  5. Click on downarrow to display droplist for selecting from defined filters
  6. Note entry for TestFilter shows description text with "WikiWord" rendered as a link, which is displayed on it's own line.
  7. Clicking on this link does not select the desired filter. Instead, it uses the link text ("WikiWord") as the filter text.

Screenshots

No response

TiddlyWiki Configuration

  • Version [e.g. v5.1.24]
  • Saving mechanism [e.g. Node.js, TiddlyDesktop, TiddlyHost etc]
  • Plugins installed [e.g. Freelinks, TiddlyMap]

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional context

Proposed fix (tested and verified locally):

Modify shadow $:/core/ui/AdvancedSearch/Filter/FilterButtons/dropdown
and change this line:

<$link to={{!!filter}}><$transclude field="description"/></$link>

to this:

<$link to={{!!filter}}><$let tv-wikilinks="no"><$transclude field="description"/></$let></$link>
FlashSystems pushed a commit to FlashSystems/TiddlyWiki5 that referenced this issue Dec 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant