Jump to content

"<font></font>" HTML tag in ".json" data file.

Recommended Posts

Attention: W3Schools.com forum members:

     The following ".json" data file is used in conjunction with an AJAX ( Asynchronous Javascript And XML ) file to print a Bible verse to my web page:

{"book": "Deuteronomy", "chapter": "4", "verse": "<p><sup><b>20</b></sup>&#8202But the L<font size="2">ORD</font> has taken you and <sup><i>c</i></sup>&#8202brought you out of the iron furnace,<br> out of &#8201Egypt, <sup><i>d</i></sup>&#8202to be a people of his own inheritance, as you are this day.</p>"}

The string "L<font size='2'>ORD</font>" prevents my ".json" data file from being printed to my web page.  Why are the other hypertext markup language ( HTML ) tags accepted, but not the "<font></font>" HTML tag?  Is there a solution for this problem?  Thank you ( see Colossians 3:15, for example ) for your help and your patience. 🙂   Keep in touch.

Sincerely in Christ,

Russell E. Willis

P.S. - Please read Proverbs 23:23.

Edited by Rewillis
Link to post
Share on other sites

The problem is the quote marks in size="2" which are ending your JSON string, you need to escape them with backslashes or replace them with single-quotes.

Unrelated, the <font> tag is deprecated and should not be used.

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...