Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 478563
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T00:42:15+00:00 2026-05-13T00:42:15+00:00

First, the way I understand it, it’s more appropriate to use numeric entities in

  • 0

First, the way I understand it, it’s more appropriate to use numeric entities in an XHTML document, such as " instead of ", is that right?

Second, for my RSS XML feed, which entity type is correct? Named or numeric? I believe it’s numeric, but see examples of both in my searches.

Third, which of the following is correct for entities inside inline JavaScript?

<span onmouseover="tooltip_on( '<strong>Tooltip inside a span</strong>
<br />Lorem ipsum dolor sit amet.<span>Lorem ipsum <code>dolor sit</code>
amet, consectetur adipisicing elit.</span>' );"
onmouseout="tooltip_off();">tooltip inside a span</span>

OR… (the tags inside the JS function are converted to named entities):

<span onmouseover="tooltip_on( '&lt;strong&gt;Tooltip inside a
span&lt;/strong&gt;&lt;br /&gt;Lorem ipsum dolor sit amet.
&lt;span&gt;Lorem ipsum &lt;code&gt;dolor sit&lt;/code&gt;
amet, consectetur adipisicing elit.&lt;/span&gt;' );"
onmouseout="tooltip_off();">tooltip inside a span</span>

EDIT 1:

Great answers below, but maybe I should have worded my question differently.

Disregarding the JavaScript question, which would YOU use for YOUR website and RSS feed:

(1) All numeric entities, (2) all named entities, (3) a mixture of both: &amp; &quot; &lt; &gt;, with the rest being numeric.

I am leaning towards 3 because my site already has &amp; &quot; &lt; &gt; &#039; deeply embedded, plus htmlspecialchars() used in quite a few places.

EDIT 2:

All good answers below, folks. Had to pick just one, unfortunately.

  • 1 1 Answer
  • 2 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T00:42:15+00:00Added an answer on May 13, 2026 at 12:42 am

    First, the way I understand it, it’s more appropriate to use numeric entities in an XHTML document, such as &#034; instead of &quot;, is that right?

    &quot; is also defined for XHTML. So you can use both.

    Second, for my RSS XML feed, which entity type is correct? Named or numeric? I believe it’s numeric, but see examples of both in my searches.

    Again, &quot; is also defined for XML. So you can use both.

    Third, which of the following is correct for entities inside inline JavaScript?

    The second one is correct since a plain < is not allowed inside an attribute value declaration (but > is).


    Edit    Now that you refined your question:

    I would use a charset that contains all characters I need. So if you want to be able to use almost any character, use Unicode and encode the characters with UTF-8.

    Thereby you can encode any character with UTF-8 directly and have no need to use character references for characters other than the special characters of XML (at least &, >, " and ').

    And here you have the free choice between the named or numeric character references. Use what you like better or what your programming language uses/prefers.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to understand the best way to use Spring (for dependency injection) with
I'm having trouble to understand how to use Quartz with QuartzInitializerListener . First I
First, let's get the security considerations out of the way. I'm using simple authentication
Is there an easy way to capitalize the first letter of a string and
What is the easiest way to capitalize the first letter in each word of
What’s the best way to capitalize the first letter of each word in a
Is there way in next piece of code to only get the first record?
I am looking for a way to pull the first 100 characters from a
What would be the best way to bring people back to their first love,
I'm doing my first experiments with Grails and am looking for a way to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.