Closed natema closed 1 week ago
Hello! 👋 Thanks for logging this issue. Please remember we are all volunteers here, so some patience may be required before we can get to the issue. Also remember that the fastest way to get resolution on an issue is to propose a change directly, https://github.com/ankidroid/Anki-Android/wiki/Contributing
Reproduced... cool!
Thanks so much for this one!
I just noticed that, while the preview works in Anki Desktop, the svg element still appears to be entirely ignored. I edited the "Anything else you want to share?" section in the issue description. At this point it's borderline to say that it's not an Anki Desktop bug. I will create an issue there as well and link it here.
https://github.com/ankidroid/Anki-Android/labels/upstream-issue. Please report it on the forums
col.backend.noteFieldsCheck(this.toBackendNote()).state == NoteFieldsCheckResponse.State.EMPTY
Screenshot from Anki Desktop Version 24.06.3 (d678e393) showing the same issue
Additional info: executed noteFieldsCheck
with data
# anki.notes.Note@21a7e6b7
fields: "<svg width=\"200\" height=\"100\"><br> <rect width=\"200\" height=\"100\" fill=\"blue\" /><br></svg>"
fields: ""
fields: ""
guid: "o#L2Vu%%uy"
id: 0
notetype_id: 1731502348910
I'm closing this as it's an issue with Anki Desktop (as per the screenshot), but please feel free to respond if I'm mistaken
Thanks so much for the detailed report! Made this one really easy to diagnose
It seems to me that there still is an issue with AnkiDroid per se: the Desktop version ignores the svgs to determine if the card is empty or unique, but correctly displays them. For example, I can create such a card: Front
What color is this?
<svg width="200" height="100">
<rect width="200" height="100" fill="blue" />
</svg>
Back
Blue
The svg element is correctly shown on Anki Desktop, while on AnkiDroid, the svg square is not shown.
Can be fixed with:
Thanks a lot! Here's the issue in the forum https://forums.ankiweb.net/t/content-of-svg-elements-is-ignored-in-determining-if-the-card-is-unique/51915
Checked for duplicates?
Does it also happen in the desktop version?
What are the steps to reproduce this bug?
Create a new card with front
Expected behaviour
Debug info
(Optional) Anything else you want to share?
I wasn't able to determine if this issue is related to #17029 or https://github.com/ankidroid/Anki-Android/issues/3250.
In Anki Desktop, the svg is correctly previewed, but it seems that Anki is still ignoring the svg, since if the front only contains the svg element Anki says that the card is empty when the user tried to create it. Moreover, the two following cards are considered the same:
Research