can't display < character

can't display < character

Postby zeppo » Fri Sep 28, 2018 4:25 pm

In cards where I have used < > characters , the app hides the display of any characters which fall between them. The characters transfer over from Google fine and show in the edit field of the cards, but not in the display. They are needed for cards about HTML that have text like <script> <div> etc

Is there some kind of escape sequence I can use to get the app to display the characters and everything in between.

If I were to leave off the > the rest will display fine. It is the act of using both < > which hides the characters and everything in between.
zeppo
 
Posts: 20
Joined: Sun Sep 23, 2018 5:56 am

Re: can't display < character

Postby Ernie » Fri Sep 28, 2018 6:37 pm

You have a few options:

1) At main decks screen, tap Edit, tap deck, Advanced, Don't Parse HTML, and turn ON. This will treat all your text as non-HTML.
2) Put a space after <
3) Replace < with &lt;
(which is HTML code for <
Ernie
Site Admin
 
Posts: 5013
Joined: Fri Oct 01, 2010 6:12 pm
Location: San Francisco / Taiwan

Re: can't display < character

Postby zeppo » Thu Oct 11, 2018 5:44 pm

Ernie wrote:You have a few options:

1) At main decks screen, tap Edit, tap deck, Advanced, Don't Parse HTML, and turn ON. This will treat all your text as non-HTML.
...


When I try the Don't Parse HTML method on a new or existing deck, it doesn't work in a lot of cases.

It didn't work on a deck that I added and then switched on Don't Parse HTML. So I thought maybe I need to create the deck, and switch it on Don't Parse, and then added the cards to the deck in an update. I tested this with a card which had "&lt;" as Side One (without the quotes) , and "used to display the less than sign <" as Side Two (without the quotes). On Side One it ends up reading it as HTML code and displays < instead of &lt;

On the original download of the full deck it also took bold text from the Google Spreadsheet and made it display as HTML code in the deck, among other things.

Not sure if I'm doing something wrong.
zeppo
 
Posts: 20
Joined: Sun Sep 23, 2018 5:56 am

Re: can't display < character

Postby Ernie » Fri Oct 12, 2018 3:21 am

I'm not sure exactly how to answer, but....

I created a new deck in Google Drive with the following text:

Text 1
&lt;Hi There>
<Hi There>

I downloaded, and side 2 was blank.
I turned on "don't parse html". I re-entered the deck and I could now see side 2 as <Hi There>

This setting doesn't really stop HTML parsing; it only changes < into &lt;
So existing &lt; will still be converted to <

Bold text in Google drive will get <b> tags at import time. If you turn on "don't parse", you'll end up seeing the <b> tags.

If you use "don't parse" option, I assume you'll want to avoid any html coding, in addition to formatting in Google Drive.
Ernie
Site Admin
 
Posts: 5013
Joined: Fri Oct 01, 2010 6:12 pm
Location: San Francisco / Taiwan

Return to Comments, Questions and Feedback