ankidroid / Anki-Android

AnkiDroid: Anki flashcards on Android. Your secret trick to achieve superhuman information retention.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Can't use "<" and ">" symbols in flashcards

olhybrius opened this issue · comments

Reproduction Steps
  1. Add a new flashcard in an existing deck with "<" and/or ">" symbols in it (whether it's on the front or the back doesn't matter). For instance, let's say we create a flashcard with "Hello <name> on it.
  2. Save the flashcard
Expected Result

While studying or simply browsing decks, the flashcard should show the whole content ("Hello <name>" in our example from above).

Actual Result

The text between the "<" and ">" symbols and the symbols themselves are ignored. Only "Hello" is displayed in our example.

Additional information : if I create the flashcard in the Anki desktop app or Ankiweb and just sync it, it displays just fine on Ankidroid.

Debug info

AnkiDroid Version = 2.9.1

Android Version = 7.0

ACRA UUID = 23c6ee72-7f20-4b10-a38c-8b73aa6f275a

Research

Enter an [ x ] character to confirm the points below:

[ x ] I have read the support page and am reporting a bug or enhancement request specific to AnkiDroid

[ x ] I have checked the manual and the FAQ and could not find a solution to my issue

[ x ] I have searched for similar existing issues here and on the user forum

Can you please enter the debug info as requested? It helps us know what version you are on

Can you please enter the debug info as requested? It helps us know what version you are on

Yes, sorry about that. I just updated my comment.

Thank you! You should update to 2.9.3 or (even better if possible) to the alpha versions following these guidelines: https://docs.ankidroid.org/#betaTesting

That will make sure you have the latest bugfixes so we know we aren't spending time diagnosing an already-fixed issue

Can you please try the alphas (they are backwards-compatible right now, you can go back to stable if you need to) and let us know if it is still happening?

Thank you! You should update to 2.9.3 or (even better if possible) to the alpha versions following these guidelines: https://docs.ankidroid.org/#betaTesting

That will make sure you have the latest bugfixes so we know we aren't spending time diagnosing an already-fixed issue

Can you please try the alphas (they are backwards-compatible right now, you can go back to stable if you need to) and let us know if it is still happening?

Switching to latest alpha (v2.10alpha35) didn't fix the issue.

I appreciate the continued effort @olhybrius - sad it is not fixed yet of course, but I'll tag this up and put it in the queue for fixing

I appreciate the continued effort @olhybrius - sad it is not fixed yet of course, but I'll tag this up and put it in the queue for fixing

That's good to hear. Thank you for your time and your work.

@mikehardy I fear you're loosing your time. This is not a bug at all. That's the way ankidroid is expected to act. At least until fields shows interpreted html instead of plain text. That may not be good a good user interface, but that's how AnkiDroid is.

@olhybrius You can use "& l t ;" and "& g t ;" instead of < and > respectively, and you'll see < and > in the reviewer. (Don't put the quotes. Don't put the spaces either. I put spaces here because github replaces "& l t ;" by "<" when there is no space) (lt means "less than" and gt means "greater than"). You can also use anki on browser if typing < does not fit you.
If you have a note with an image or some formatting, take a look at it. Edit it. You'll see there is some < and > in the code. For example some text in italic. That's simply HTML. That's what Anki uses for formatting. In your example, you stated that:

  • after hello, I want to start formatting the remaining of the text in the way "name". Since there is no formatting called "name", it's simply ignored.
commented

image

Anki desktop app(OS X version) can modify card style with a toolbox here while Ankidroid can only input text.

Users cannot modify text style when adding note in Ankidroid if we encode content text in edittext to html text(eg. replace "<" with "&lt;").

@mikehardy Any ideas?

Good luck with finding any idea which does not require a lot of work. Adding this to ankidroid would mean incorporating an HTML editor and ensuring it interacts nicely with the backend. Nothing impossible, but we just need to find a dev' accepting to give days (at least) to code and debug it.

That's this issue #1377 so this is duplicate

HTML editor is the trick, at some point someone will do it