Opened 14 years ago

Closed 14 years ago

Last modified 14 years ago

#867 closed defect (invalid)

Problem with ampersands in links

Reported by: mario@… Owned by: wymsy
Priority: normal Milestone:
Component: Plugin_GetHtml Version:
Severity: normal Keywords: ampersands


Hi, there is a bug when we add a link in xinha and use ampersands.



Is there a solution?



Change History (5)

comment:1 Changed 14 years ago by ray

  • Resolution set to invalid
  • Status changed from new to closed

This is absolutely correct, as & is a reserved character in HTML and has to be written as &

comment:2 Changed 14 years ago by ray

Oh, I have not read correctly: Is it really



comment:3 Changed 14 years ago by mario@…

  • Resolution invalid deleted
  • Status changed from closed to reopened


It's teste.php?a=1&b=2.

I agree that in a normal text, & should be translated to &
But it's not ok that this be translated inside a hyperlink. This way the link will not work.

this is ok:
Name &: Name associates

this is not ok:
<a href="teste.php?a=1&b=2">Click here</a>

comment:4 Changed 14 years ago by ray

  • Resolution set to invalid
  • Status changed from reopened to closed

Single ampersands. Although HTML user agents have tended to turn a blind eye, you should never have a single ampersand (&) in your document. You should pay particular attention to URIs that include parameters. For example, your document should contain, rather than;name=user.

comment:5 Changed 14 years ago by gogo

This thread is a bit confusing because some entities have been converted by the looks of things.

To summarize: the entization shown being performed in the original post is CORRECT. An entity is not only valid at that point, it is required for the document to be valid. If your browser isn't handling the entity in the URL correctly, then it is probably very very old and definately very very broken.

Note: See TracTickets for help on using tickets.