SitePoint Sponsor

User Tag List

Results 1 to 10 of 10
  1. #1
    SitePoint Guru Todd Temple's Avatar
    Join Date
    Mar 2005
    Location
    Tennessee
    Posts
    797
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    My URLs Are Showing Hyphens As %2D

    I have coded the links as <a href="http://domain.com/link-to-file/">Link</a> but the domains display in the browser as http://domain.com/link%2Dto%2Dfile/. Why is this happening? Here is a link to the site in question.

    LINK-
    http://www.madiganperio.com/
    Todd Temple > T2 Design

  2. #2
    Follow Me On Twitter: @djg gold trophysilver trophybronze trophy Dan Grossman's Avatar
    Join Date
    Aug 2000
    Location
    Philadephia, PA
    Posts
    20,580
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    I don't see that on your site.

    http://www.madiganperio.com/about-us/dr-madigan/

    lots of dashes, no mis-encoding

  3. #3
    Resident curmudgeon bronze trophy gary.turner's Avatar
    Join Date
    Jan 2009
    Location
    Dallas
    Posts
    990
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Just taking a wild guess: It appears you're using MSFT Office to generate the pages. (MicrosoftOfficeWebServer: 5.0_Pub) In that case, the character encoding is probably windows-1252. That encoding uses values that are invalid on the web, e.g. hyphens, single and double "curly" quotes. My guess is that Office escapes those invalid characters as valid ASCII/ANSI entities. I didn't spot any of those invalid characters (they're not invalid within their declared set) in the body of the page.

    Blowing my whole theory out of the water is the page's http-equiv charset utf-8. :shrug: So, there's the SWAG.

    cheers,

    gary
    Anyone can build a usable website. It takes a graphic
    designer to make it slow, confusing, and painful to use.

    Simple minded html & css demos and tutorials

  4. #4
    SitePoint Member
    Join Date
    Dec 2009
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    it is the same as / = &#37;2F
    no problem with it.
    You can instead "-" = "_" to avoid it.

  5. #5
    SitePoint Guru Todd Temple's Avatar
    Join Date
    Mar 2005
    Location
    Tennessee
    Posts
    797
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by gary.turner View Post
    Just taking a wild guess: It appears you're using MSFT Office to generate the pages. (MicrosoftOfficeWebServer: 5.0_Pub) In that case, the character encoding is probably windows-1252. That encoding uses values that are invalid on the web, e.g. hyphens, single and double "curly" quotes. My guess is that Office escapes those invalid characters as valid ASCII/ANSI entities. I didn't spot any of those invalid characters (they're not invalid within their declared set) in the body of the page.

    Blowing my whole theory out of the water is the page's http-equiv charset utf-8. :shrug: So, there's the SWAG.

    cheers,

    gary
    It must be the web host that is using MSFT Office Web Server, not me. I steer clear of Microsoft products. What if I were to change the character encoding to this instead of UTF-8?

    <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />

    Would that fix my problem or would it create a whole new set of problems to fix?

    Todd
    Todd Temple > T2 Design

  6. #6
    Resident curmudgeon bronze trophy gary.turner's Avatar
    Join Date
    Jan 2009
    Location
    Dallas
    Posts
    990
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Like Dan, I'm not seeing the escaped hyphens. Were it me, I wouldn't worry about it as long I were saving as utf-8, and had my meta http-equiv set to utf-8.

    cheers,

    gary
    Anyone can build a usable website. It takes a graphic
    designer to make it slow, confusing, and painful to use.

    Simple minded html & css demos and tutorials

  7. #7
    SitePoint Guru Todd Temple's Avatar
    Join Date
    Mar 2005
    Location
    Tennessee
    Posts
    797
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thats really weird!!!!!

    I just tried the same site in Firefox and clicking on the navigation link for "Forms and Support" shows this URL in the address bar:
    http://www.madiganperio.com/forms-and-support/faq/

    The same link from Safari is displayed below:
    http://www.madiganperio.com/forms%2Dand%2Dsupport/faq/

    Why would it do this?

    That is really weird...
    Todd Temple > T2 Design

  8. #8
    SitePoint Member
    Join Date
    Feb 2010
    Posts
    1
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Did you find a solution to this? I have the same problem and it appears only in Safari. It's not a huge problem but it looks messy. The web page still validates as far as I can see.

    Daf

  9. #9
    Robert Wellock silver trophybronze trophy xhtmlcoder's Avatar
    Join Date
    Apr 2002
    Location
    A Maze of Twisty Little Passages
    Posts
    6,316
    Mentioned
    60 Post(s)
    Tagged
    0 Thread(s)
    URL encoding replaces the unsafe ASCII characters with "%" followed by two hexadecimal digits corresponding to the character values in the ISO-8859-1 character-set. I suspect it's actually the server.


  10. #10
    SitePoint Guru Todd Temple's Avatar
    Join Date
    Mar 2005
    Location
    Tennessee
    Posts
    797
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Dafmeister View Post
    Did you find a solution to this? I have the same problem and it appears only in Safari. It's not a huge problem but it looks messy. The web page still validates as far as I can see.

    Daf
    Yes, and XHTMLCODER was on the right track. I had to contact the web hosting provider and they did something on their end. Not sure what, by they were able to fix it in minutes. Hope this helps!
    Todd Temple > T2 Design


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
  •