AW: [Pmwiki-users] restore problem

Patrick R. Michaud pmichaud
Thu Feb 12 07:49:14 CST 2004


On Thu, Feb 12, 2004 at 10:36:47AM +0100, Thomas -Balu- Walter wrote:
> On Thu, Feb 12, 2004 at 08:58:59PM +1300, Robin Sheat wrote:
> > On Thu, Feb 12, 2004 at 08:25:10AM +0100, Christian Kehl wrote:
> > > http://www.mydomain.com/?pagename=Main.HomePage?action=attr
> > Amend to:
> > http://www.mydomain.com/?pagename=Main.HomePage&action=attr
> 
> http://www.mydomain.com/?pagename=Main.HomePage&action=attr
>                                                ^^^^^
> You should not use & in URLs, but there HTML entity...
> 
> e.g. http://example.com/electricity.php?volt=120&amp=7
> will definitely give some problems.

Actually, one should only use HTML entities in URLs when the URL
is part of an HTML tag (e.g., the href attribute of an anchor tag).
Thus, if coding HTML one writes

   <a href='http://example.com/electricity.php?volt=120&amp;amp=7'>link</a>

but if entering the URL in a browser's address bar one enters it without
the HTML entity, as in

   http://example.com/electricity.php?volt=120&amp=7

So, in the original question, the correct URL is indeed

   http://www.mydomain.com/?pagename=Main.HomePage&action=attr

URLs don't contain HTML entities, but when a URL is placed in an HTML
document the '&'s have to be coded with &amp; (same as any other HTML
attribute containing '&', '<', or '>').

Pm



More information about the pmwiki-users mailing list