1

How can i place valid link with get parameters into my page?

When i run validator, it gives error:

Line 37, Column 37: reference to entity "p" for which no system identifier could be generated
<li><a href="index.php?c=tutorials&p=cat&cid=1" >LINK</a></li>
kravemir
  • 10,636
  • 17
  • 64
  • 111

5 Answers5

4

from here http://css-discuss.incutio.com/wiki/Code_Validation

The most common error by far looks something like this: reference to entity "BV_Engine" for which no system identifier could be generated. What that means is simply that you've got a URL with an & sign in it that you forgot to escape.

For example: <a href="script.cgi?id=4&BV_Engine=20">

The & sign in this URL should be &. In fact ALL & signs in an HTML document should be escaped in this way to avoid causing confusion to HTML parsers. For the above example, replacing it with

<a href="script.cgi?id=4&amp;BV_Engine=20">
madmik3
  • 6,975
  • 3
  • 38
  • 60
2

Escape your ampersands:

<li><a href="index.php?c=tutorials&amp;p=cat&amp;cid=1" >LINK</a></li>
Ben Saufley
  • 3,259
  • 5
  • 27
  • 42
1

You have to use & instead of plain &. Its an html entity.

<li><a href="index.php?c=tutorials&amp;p=cat&amp;cid=1" >LINK</a></li>
ludesign
  • 1,353
  • 7
  • 12
0

To be compatible with XHTML (and XML in general), the ampersand must be escaped. To do so requires the use of an SGML/XML entity.

There are three different entities that can be used to represent the ampersand:

  1. Named entity: &amp; (This is one of the five predefined entities defined in the XML specification.)

  2. Decimal numeric character reference: &#38;

  3. Hexadecimal numeric character reference: &#x26;

So, the value of your example href attribute could be represented in one of these three ways:

href="index.php?c=tutorials&amp;p=cat&amp;cid=1"
href="index.php?c=tutorials&#38;p=cat&#38;cid=1"
href="index.php?c=tutorials&#x26;p=cat&#x26;cid=1"

Of course, it would be valid to mix the above entities like this:

href="index.php?c=tutorials&amp;p=cat&#38;cid=1"
                           ^^^^^     ^^^^^

...but most would argue for taking a consistent approach throughout a document (and even an entire web site).

Of the three entities that can be used to represent the ampersand, I believe that &amp; is used most commonly in XHTML.

Final note: One of the above entities should also be used when authoring HTML, however browsers today do not require that the ampersand be escaped.

Community
  • 1
  • 1
DavidRR
  • 18,291
  • 25
  • 109
  • 191
0

Yes, as the others have posted above, you need to escape your amparsands as &amp; rather than &.

<li><a href="index.php?c=tutorials&amp;p=cat&amp;cid=1">LINK</a></li>

should work.

Kevin Ji
  • 10,479
  • 4
  • 40
  • 63