Feature Request – Option to Ignore HTML Tags in Browse Search

Is your feature request related to a problem? Please describe.

Yes. When using the Browse window in Anki Desktop, I often try to search for a word (e.g. in German) to check if it already exists in my notes. However, this becomes problematic when the word is partially wrapped in HTML tags, like <b>, <span>, etc. used for formatting.

Example:

<b>über</b>setzen

Searching for übersetzen does not return a match, even though the word is there – just split across HTML tags.

Worse, in more complex formatting like:

<b>ge</b>stres<span style="color: rgb(181, 0, 91);"><b>st</b></span>

I cannot find the word gestresst at all, because it’s broken into several HTML segments. This makes browsing inconsistent and frustrating.


Describe the solution you’d like.

I’d love to have a search modifier like:

plain:gestresst

That would search the text content only, ignoring all HTML tags and formatting. It should match:

  • gestresst

  • <b>ge</b>stresst

  • <span style="color:red"><b>ge</b></span>stresst

  • or even more broken-up versions

Alternatively, a simple checkbox in the Browse UI like:

[✓] Ignore HTML in search

would make this much easier to handle.


Describe alternatives you’ve considered.

  • Using wildcards:
    e.g. Back:*>ge<* OR Back:ge helps if the prefix is entirely in a tag, but fails when tags are split mid-word.

  • Adding a duplicate “clean” field (no HTML) to each note just for searching — works, but is clunky, adds overhead, and makes note editing prone to errors.

  • Regular expressions don’t help either because the word is no longer contiguous in the raw HTML.


Why this matters

For learners of languages like German, highlighting stems/prefixes (e.g. ab, un, ge) using bold or color helps with memorization — but it completely breaks search.

Adding a simple option to search the plain text only would greatly improve the experience and eliminate confusion when browsing existing notes.

Thank you for considering this!

You should configure that field to be a sort field. It should then work just fine, see Searching - Anki Manual :

Anki is only able to search within formatting in the sort field you’ve configured. For example, if you add “example” to one of your fields, with the “exa” part in bold, this will not be matched when searching for example unless that field is the sort field. If a word is not formatted, or the formatting does not change in the middle of the word, then Anki will be able to find it in any field.

Edit: For completeness, to learn how to set a field as a sort field, see Adding/Editing - Anki Manual.

1 Like

You can find it using a Regular expressions search, but it will strictly remove everything in <>, and the query is long and cumbersome to type. The speed isn’t as great, but overall, it’s possible to implement this with an add-on.