Results 1 to 5 of 5
  1. #1
    Member
    Join Date
    October 27th, 2005
    Posts
    34
    XHTML Breaking Links
    Hi, all.

    I have been an affiliate of shareasale for about two years now.

    I am presently in the middle of a complete makeover of my page, which has been redone completely in xhtml and CSS. I am trying to be real anal about adhering to all applicable standards, so I am trying to get both the xhtml markup and CSS to validate (using http://validator.w3.org/ and http://jigsaw.w3.org/css-validator/ ).

    My problem is that the affiliate link does not validate.

    The original link is as follows:

    a href=http://www.shareasale.com/r.cfm?b=5725&u=101198&m=1909&urllink=&afftrack=

    The validator told me to put quotation marks around the URL and to get rid of the "&" symbol, which I did, replacing it with its %26 encoding. The new link looks as follows:

    a href="http://www.shareasale.com/r.cfm?b=5725%26u=101198%26m=1909%26urllink=%26afftrack="

    However, as a test, copying and pasting the old link into a browser address bar takes me to the correct page, while doing the same with the new link does not. I get a "Bad link" error.

    So now I am puzzled: what am I overlooking? Is there a way around this problem? I want the link to work, but I'd also like to be completely consistent when adhering to the xhtml strict standard.

    Any advice would be much appreciated.

    Regards,


    Thess

  2. #2
    Fear and Arrogance jrrl's Avatar
    Join Date
    January 18th, 2005
    Location
    Pittsburgh
    Posts
    485
    In XHTML urls, replace "&" with "&". Yeah, it looked spooky to me at first, too.

    -John.
    There's a reason army's wear uniforms even though it makes them easier to spot. Sometimes that's what you want. Uniforms suggest organization, power, and numbers. These, in turn, inspire fear. And, as any good operative knows, there is no more effective weapon than fear.

    Hosting Comparison - HostScope - jrrl.com

  3. #3
    Member
    Join Date
    October 27th, 2005
    Posts
    34
    Okay, you just blew my mind!
    I should replace an ampersand with an ampersand?!?! I only have one ampersand key on my keyboard. What exactly is the change you are suggesting?

    I also tried coding the ampersand as its html code: & amp; (without the space)
    However, that approach still yielded a "bad link" error from shareasale.

    I don't suppose shareasale provides alternative links for people who decide to go the xhtml route, do they?

    Regards,


    Thess

  4. #4
    Resident Genius and Staunch Capitalist Leader's Avatar
    Join Date
    January 18th, 2005
    Location
    Florida
    Posts
    12,817
    The board software automatically mutated his suggestion. Here, I'll put it with spaces in so it doesn't get "rendered."

    It's: Replace "&" with "& a m p;"

    Take the spaces out of the second one, and you have the replacement.
    BTW It may go through, but make sure it'll actually track that way...
    There is no knowledge that is not power. ~Hemingway

  5. #5
    Member
    Join Date
    October 27th, 2005
    Posts
    34
    Thanks, Leader.

    I had tried that already:

    http://www.shareasale.com/r.cfm?b=5725&u=101198&m=1909&urllink=&afftrack=

    Copying and pasting this link into the broswer address bar still yields the "There is an error in your link code." message.

    What other options do I have?

    Regards,


    Thess

  6. Newsletter Signup

+ Reply to Thread

Similar Threads

  1. Any Chance of a Tableless XHTML Store?
    By glittered in forum GoldenCAN
    Replies: 1
    Last Post: March 14th, 2007, 10:40 AM
  2. &amp: vs & in XHTML Links
    By John Powell in forum ShareASale - SAS
    Replies: 0
    Last Post: February 14th, 2007, 03:54 PM
  3. XHTML and Encoding Character Entities in Links
    By blizzard in forum Programming / Datafeeds / Tools
    Replies: 2
    Last Post: February 12th, 2006, 11:09 AM
  4. xhtml question
    By lisaweb in forum Midnight Cafe'
    Replies: 0
    Last Post: December 28th, 2004, 01:49 PM

Posting Permissions

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