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 5974105
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T20:53:45+00:00 2026-05-22T20:53:45+00:00

When using the application/xhtml+xml Content-Type I cannot use any named HTML entities in my

  • 0

When using the application/xhtml+xml Content-Type I cannot use any named HTML entities in my javascript ( , €, etc.).

It works fine when I use a text/html Content-Type. The offending HTML entities also work fine when put in the document itself (Instead of using Javascript).

When I hit the “F12 developer tools” in IE9, I get the following error:

SCRIPT5022: DOM Exception: SYNTAX_ERR (12) 
    javascript.js, line 7 character 2
XML5645: The specified entity has not been declared. 
    , line 1 character 42

Firefox gives a similar error:

[11:19:33.491] undefined entity:1
[11:19:33.493] uncaught exception: [Exception... "An invalid or illegal string was specified"  code: "12" nsresult: "0x8053000c (NS_ERROR_DOM_SYNTAX_ERR)"  location: "http://arp242.net/entity-test/javascript.js Line: 8"]

And then execution stops.

I created a test page for testing/isolating where the problem is: http://arp242.net/entity-test/

As far as I can figure out, named HTML entities are perfectly valid in XHTML (http://www.w3.org/TR/2002/REC-xhtml1-20020801/#h-A2)

Does anyone have a clue how to resolve the problem? I can enter the characters (€, —, “, ”, etc.) or numeric &#..; values and that works, but I’d rather use HTML entities. There is also quite a bit of existing (3rd party) code which uses HTML entities and I’d rather not convert all of that.

Thanks!

  • 1 1 Answer
  • 0 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-22T20:53:45+00:00Added an answer on May 22, 2026 at 8:53 pm

    XML hasn’t text named entities, you can define them either in doctype or replace text named entities with char code entites ( eg.   is   etc. )

    http://en.wikipedia.org/wiki/List_of_XML_and_HTML_character_entity_references
    ( Take unicode code point in decimal )

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

Sidebar

Related Questions

I was testing this, since I understood using XHTML let me use any valid
An older application using System.Web.Mail is throwing an exception on emails coming from hr@domain.com
Currently we're using Web Application project, so we have a gain with compilation. But
I distribute my application using a VS2008 install package, which normally works great. When
I`m developing an application using Spring WebFlow 2, Facelets and JSF. One of my
I am using an application in c++ that uses a special dprintf function to
I'm developing a web- application using NHibernate. Can you tell me how to write
I have to develop an application using C#.net that has to be run once
I am developing a web application using Struts 2.1.2 and Hibernate 3.2.6.GA. I have
I have a web application using ASP.NET 2.0 and I want to know if

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.