Skip to content

text-editor saves & as &, so full-text search no longer finds the note #3439

Closed

Description

@duderik

Initial Checklist

  • I understand this is a bug report and questions should be posted in the Discussions
  • I searched the issues and discussions of opencloud-eu/web, opencloud-eu/opencloud and opencloud-eu/web-extensions and found nothing about this

Bug Description

When the text editor saves Markdown, it rewrites plain characters in the text. & becomes &amp;, < becomes &lt; and > becomes &gt;. *, _, ~, [, ] and \ get a backslash. The note looks the same, but the file text changes. Full-text search reads the file text, so after one save the note is no longer found by words with these characters. We confirmed this for & on our instance.

The rewrite comes from Tiptap's Markdown output (entity encoding added in ueberdosis/tiptap#7565). Markdown does not need it for plain text like Q&A or a < b.

Reproduction Steps

  1. Create test.md with the line Searchtestalpha&Searchtestbeta.
  2. Search for Searchtestalpha&Searchtestbeta. The note is found.
  3. Open test.md in the text editor, change any other word, save. The line is now Searchtestalpha&amp;Searchtestbeta.
  4. Search again.

Expected Outcome

The note is still found after saving.

Actual Outcome

No result.

Setup

OpenCloud 8.0.1 (Web 8.0.0), full-text search with Tika. Related: #3434, #3435

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions