• I’m having alot of problems with quotes and aprostrophes in headlines getting translated into bad code – They seem to get turned into ugly ASCII code in my RSS feeds, and worse, they actually get incorporated in to URLs sometimes.

    I’ve tracked this problem down to “smart quotes”. I thought the problem was people cutting and pasting from MSWord, but I’ve seen the problem happen when headlines are just typed in normally.

    Is there a way to just kill them alltogether?
    Is there a way to make the RSS feed smarter so it doesn’t display gobbledy gook in people’s RSS readers?

    Thanks!

Viewing 15 replies - 1 through 15 (of 16 total)
  • Look at your page source and see if there’s junk around the headlines. The plugin Unfancy Quotes should override smart quotes, but you still must be getting them from MS Word.

    Thread Starter nickaster

    (@nickaster)

    Thanks!

    Check this page out:

    http://www.triplepundit.com/2009/09/rosabeth-moss-kanter-speaks-about-valuecorp/

    It’s obviously got smart quotes in the headline (you can see it in the source). The thing is, I wrote that headline myself and didn’t go anywhere near MS Word or any other editor. I just typed those quotes directly into the title field.

    How in the world did that happen? Is it the browser? (Chrome and FF both show fancy quotes to me on PC)

    Looks fine to me.

    Thread Starter nickaster

    (@nickaster)

    Yeah, the page looks fine, but you can see in the source code that “smart quotes” are in there. In some RSS readers this makes the headline look like junk. I’m trying to figure out how smart quotes got into the headline just by typing the headline into the title field – I never touched MS word.

    In your wp-includes folder, there is a file called formatting.php. I am sure that the replace function is in there somewhere, because I removed the curly quotes once from a troublesome site. I’m afraid I can’t remember where in this file it is, though! Anyone?

    Try using the HTML entities in your post instead of the actual quote mark; they should render OK in a feed and show as curly quotes in HTML. See reserved characters in HTML.

    for a left quote, use   «
    for a right quote, use    »
    Thread Starter nickaster

    (@nickaster)

    Thanks guys.

    It’s not practical to ask my authors to use the HTML, there’s too many and they’ll never understand or remember.

    Is this behavior normal? Or is something wrong with my install? If I mess with formatting.php, is that a dangerous hack?

    Thanks!

    Thread Starter nickaster

    (@nickaster)

    Guys – are “smart quotes” supposed to happen in headlines or not? I keep seeing them find their way in and I am NOT using microsoft word. Is this normal behavior or not?

    Are smart quotes in your headlines all the time, on every headline? If so, they must be in your theme.

    Thread Starter nickaster

    (@nickaster)

    Yeah, they seem to always be there. Had no idea such a thing was possible in a theme. Do you know how one would begin to look for such a thing? I want to at least get rid of them in headlines.

    Look for quote marks around the post/page title block, which is usually something like:

    <h1><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title(); ?>"><?php the_title(); ?></a></h1>

    Thread Starter nickaster

    (@nickaster)

    Thanks. Sorry I misunderstood… no, quotes are only in headlines if people type them in.

    I did a little experiment and added quotes around a word in a recent headline, then loaded the page up and, sure enough, they turn out as smart quotes. Is this happening in the browser? Is it possible that there’s something clever in the theme that I haven’t found?

    Thanks!

    Try these html entities in a test post and see if they come across OK in a feed. Then delete the post.

    for a left quote, use   &laquo;
    for a right quote, use    &raquo;

    Nick – I understand where you’re coming from. WordPress was turning my quotes into smart quotes – not in the URL but in the HTML title, which was mucking up how they appeared in google.

    For instance, if someone searched on “I’m blah blah etc” then, if a page of mine that had I’m in the title was in the results, the I’m wouldn’t be bolded because of the smart quotes.

    Anyway, the solution is to turn off the wptexturise filter. See the first answer here for how to do that:
    http://forum.bytesforall.com/showthread.php?t=2932

    If it helps, I wrote up the similar problem I was having and some instructions on my own blog:
    http://www.malcolmcoles.co.uk/blog/wordpress-smart-quotes

    There’s also an example of how smart quotes can cause you problems in google’s results.

Viewing 15 replies - 1 through 15 (of 16 total)
  • The topic ‘Getting Rid of “Smart Quotes”’ is closed to new replies.