ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Apostrophe converting to entity (amp-pount-8217-semicolon) in title field

February 06, 2009 1:31pm

Subscribe [2]
  • #1 / Feb 06, 2009 1:31pm

    Todd Levy

    20 posts

    Okay, I’m having a small issue that I hope is easy to solve.

    I’ve got a post title that has an apostrophe in it.

    I’m using a standard single prime for the apostrophe (this thing—> ‘)

    I’m cool with that. I don’t need it to be curly, especially in the title.

    The problem is, it’s somehow automatically being converted to

    This is no big deal in a normal browser experience, because the browser simply renders the entity and you see the “real” curly apostrophe.

    However, in my RSS feed you actually see the numeric entity which when you view source looks like this…

    ’

    Compare here and here for reference…

    http://jamtopia.com/blog/satans-box-office/

    http://feedproxy.google.com/jamtopia

    Any help greatly appreciated as this is driving me somewhat insane.

    TL

  • #2 / Feb 06, 2009 5:27pm

    Sue Crocker

    26054 posts

    If you look at your feed from your RSS template, do you have the same issues?

    I just added an entry to my EEHowTo site with an apostrophe in it, and my native RSS feed displays it correctly.

    Which version and build of ExpressionEngine are you using? You can find that out at the bottom on any control panel page.

  • #3 / Feb 06, 2009 7:12pm

    Todd Levy

    20 posts

    v1.6.6, build 20081212

    Here’s the RSS template…

    http://jamtopia.com/feeds/rss-2.0

    {assign_variable:master_weblog_name="default_site|jamtopia_videos"}
    {exp:rss:feed weblog="{master_weblog_name}"}
    <?xml version="1.0" encoding="{encoding}"?>
    <rss version="2.0"
        xmlns:dc="http://purl.org/dc/elements/1.1/"
        xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
        xmlns:admin="http://webns.net/mvcb/"
        xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
        xmlns:content="http://purl.org/rss/1.0/modules/content/"
        xmlns:atom="http://www.w3.org/2005/Atom">
        <!-- 795A7917026C7DD524F8E9FDE38D644B -->
    <channel>
    <title>{exp:xml_encode}{site_name}{/exp:xml_encode}</title>
    <link>{homepage}</link>
    <atom:link href="http://feeds.feedburner.com/jamtopia" rel="self" type="application/rss+xml" >
    <description>{g_page_description}</description>
    <dc:language>{lang}</dc:language>
    <dc:creator>[email protected]</dc:creator>
    <dc:rights>Copyright {gmt_date format="%Y"}</dc:rights>
    <dc:date>{gmt_date format="%Y-%m-%dT%H:%i:%s%Q"}</dc:date>
    <admin:generatorAgent rdf:resource="http://expressionengine.com/index.php?affiliate=toddlevy" >
    {exp:weblog:entries weblog="{master_weblog_name}" limit="10" rdf="off" dynamic_start="on" disable="member_data|trackbacks"}<item>
    <title><![CDATA[{title}]]></title>
    <link>{title_permalink=blog/index}</link>
    <guid>{title_permalink=blog/index}</guid>
    <description><![CDATA[{summary}{video_summary}]]></description> 
    <dc:subject>{exp:xml_encode}{categories backspace="1"}{category_name}, {/categories}{/exp:xml_encode}</dc:subject>
    <dc:date>{gmt_entry_date format="%Y-%m-%dT%H:%i:%s%Q"}</dc:date>
    </item>{/exp:weblog:entries}
    </channel>
    </rss>{/exp:rss:feed}
  • #4 / Feb 07, 2009 3:35pm

    Greg Aker

    6022 posts

    Does it correct it if you add {exp:xml_encode}{title}{/exp:xml_encode} for the title field?

    -greg

    ps.  Interesting article you linked to.

  • #5 / Feb 07, 2009 8:09pm

    Todd Levy

    20 posts

    Does it correct it if you add {exp:xml_encode}{title}{/exp:xml_encode} for the title field?

    That worked! But not if I wrap it in a CDATA, so I’m just not gonna do that 😊

    ps.  Interesting article you linked to.

    Thank you. If you like that one, you might also like this one…

    An Open Letter to Nathan Hubbard, Live Nation Ticketing CEO


    Thanks so much for your help.

    TL

  • #6 / Feb 08, 2009 3:12am

    Sue Crocker

    26054 posts

    Glad Greg was able to help. Don’t hesitate to post again as needed.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases