Support » Requests and Feedback » Quotes in URLs

  • nickaster

    (@nickaster)


    Hi all. The more I think about this, the more I see it as a bug in the software.

    Context:
    http://wordpress.org/support/topic/297263?replies=12#post-1171388

    If a writer uses quote marks or apostrophes in a title, then the permalink URL that’s created actually includes quotes or apostrophes. That’s really bad URL formatting and although they seem to work, causes problems if you want to share posts. Plus it looks really ugly.

    I’m curious as to why WP allows this at all, and whether I’m just one lone guy freaking out about it. Seems like common sense that the “pretty url” feature should strip anything other than alphanumeric characters.

Viewing 6 replies - 1 through 6 (of 6 total)
  • design_dolphin

    (@design_dolphin)

    Seems like common sense that the “pretty url” feature should strip anything other than alphanumeric characters.

    As far as I know it does normally. Or it should(?).

    Works fine on my site, see for example:
    http://www.ecodelphinus.com/chronisch-zieken-en-gehandicapten/techniek/data-entry-errors-zoek-resultaat-in-pubmed-central-pmc.html

    And always has actually.

    Just using standard permalinks code:
    http://codex.wordpress.org/Using_Permalinks

    So not sure what is going on.

    nickaster

    (@nickaster)

    Woah. Now that’s very interesting. So there’s definitely something wrong with mine. THanks for that info!

    nickaster

    (@nickaster)

    Incidentally, I figured it out – it’s those damn “smart quotes” that MS word created. Authors had been using it and copying and pasting headlines into WP. If you avoid smart quotes it works fine.

    design_dolphin

    (@design_dolphin)

    Thank you for posting the cause and the solution. 🙂

    P.s:
    I am not sure if you are allowed to use the word d**n in the forum.

    nickaster

    (@nickaster)

    well, the use of that word was polite considering how I feel about MS word 🙂

    I suppose I should leave it up to WP to find a way to fool-proof it if people paste in from MS word or another smartquote source.

    design_dolphin

    (@design_dolphin)

    I suppose I should leave it up to WP to find a way to fool-proof it if people paste in from MS word or another smartquote source.

    Not sure if it is possible to do so. Although you might be able to write some kind of php code for a field form which would strip the characters, or a plugin which does the same thing. Just strip everything except plain text. However you would have to preserve (single) quotes, spaces, dashes, and parentheses (and possible other things as well).

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Quotes in URLs’ is closed to new replies.