SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Addict
    Join Date
    Feb 2008
    Location
    New Jersey, USA
    Posts
    374
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Special Characters in HTML

    Hi,

    So, I just signed up for this site http://www.designerpages.com/, where I can host my company's products.

    On my products page, I'm trying to link to my page here:
    http://www.foremostgroups.com/K&B/he.../bastille.html

    The problem is, when I type in a &, it changes it to & so the page comes up with Error 404.

    If I do & it keeps it the same

    When I try doing & it makes the link
    http://www.foremostgroups.com/K&.../bastille.html
    and this also comes up with 404.

    Does anyone have any ideas how I can do this so that it will do the & correctly?

  2. #2
    SitePoint Addict
    Join Date
    Feb 2008
    Location
    New Jersey, USA
    Posts
    374
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    nevermind, i got it:

    %26

  3. #3
    John 8:24 JREAM's Avatar
    Join Date
    Sep 2007
    Location
    Florida
    Posts
    1,508
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    you can also do & for ampersand I think

  4. #4
    In memoriam gold trophysilver trophybronze trophy Dan Schulz's Avatar
    Join Date
    May 2006
    Location
    Aurora, Illinois
    Posts
    15,476
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    & works also for the ampersand.

  5. #5
    SitePoint Wizard bronze trophy C. Ankerstjerne's Avatar
    Join Date
    Jan 2004
    Location
    The Kingdom of Denmark
    Posts
    2,702
    Mentioned
    7 Post(s)
    Tagged
    0 Thread(s)
    You can't use & and & in URLs if what you want is a litteral et-ligature. & will be interpreted as an &, and will thus break up the line. Consider the following two examples:
    example.com/search.php?query=example%26something%3Dsomething%20else
    example.com/search.php?query=example&something=something else
    In the first example, query will return example&something=something else, which in the second example, query will return example and something will return something else.
    Christian Ankerstjerne
    <p<strong<abbr/HTML/ 4 teh win</>
    <>In Soviet Russia, website codes you!

  6. #6
    SitePoint Addict
    Join Date
    Feb 2008
    Location
    New Jersey, USA
    Posts
    374
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    the page would auto-format anything with ampersand to the &#38; and this would return a page not found... &#37;26 was the only one that worked.

    Thanks for the help guys!


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •