ankitects / ankitects/anki

Content of SVG elements is ignored in determining if the card is unique

Open
#3,585 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
30.5k
Forks
3.2k
Avg merge
2d 8h
Merged PRs (30d)
72

Description

> It seems that Anki (I’m on Version ⁨23.12.1 (1a1d4d54)⁩, Python 3.9.15 Qt 6.6.1 PyQt 6.6.1), SVG elements are ignored for determining if the card is empty or unique.
> To reproduce, try to create a card with Front
>

This is happening because we strip HTML from the field prior to determining if it's empty, as invisible br/b/etc tags would otherwise cause a visually-empty field to be accepted.

Originally reported on https://forums.ankiweb.net/t/content-of-svg-elements-is-ignored-in-determining-if-the-card-is-unique/51915

Contributor guide

Open the contributing guide

Research direction

Start by locating the logic that strips HTML before checking whether a field is empty or a card is unique. Reproduce the issue with the provided SVG and verify that its content is considered while visually empty fields remain rejected; the issue provides no file or test path.

Written by the indexing model from the issue text.

Assessment

Tech stack
html, python
Domain
desktop
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.