How to include apostrophe in Site Name & CCK field

Joined: 12/01/2008

Hello,

I'm working on a new web site for my church, The Lamb's Fellowship Lake Elsinore. The apostrophe in the Site Information > Name field displays my site name correctly in the header and on the browser bar. However, in site-generated emails (i.e., for moderated content), it displays funky: "The Lamb's Fellowship Lake Elsinore".

I assume this has something to do with needing to escape the apostrophe, but when I do that (usually a double single quote for MySQL) the site name displays incorrectly -- with double single quotes -- in the header and the browser.

This also happens in a CCK field I created in the User Profiles, for a Church Role field (i.e., Director of Women's Ministry displays with the same problems experienced in the site name with apostrophe).

Thanks so much!

Colleen Robledo

Colleen Robledo
http://www.colleenrobledo.net

"I will sing to the Lord, because He has dealt bountifully with me." - Psalm 13:5

G&G Podcast Host
Matt Farina's picture
Joined: 06/01/2006
Clarify

This isn't an issue of MySQL escaping. All data in drupal is stored as it is entered (though properly escaped). Any filtering that affects how it's viewed happens when it's rendered for a page. This is important because we can render what was initially input based on how we are now presenting it.

In emails this is displaying the html hex code that escapes it for presentation to the screen. My guess is those emails are just plain text so the hex codes are displaying. What module are you using for this?

It sounds like there might be a bug to be worked out.

Matt Farina
Geeks and God Former Co-Host
www.mattfarina.com

Joined: 10/18/2008
I had this problem too

I had this problem too (http://geeksandgod.com/forums/dynamic-website-foru...), and I ended up using this for my links:

l(html_entity_decode($node->title, ENT_QUOTES), "node/$node->nid");

You can probably do the same with your cck field by saying

html_entity_decode($cck->field['0']['view'], EN_QUOTES)

I don't think html_entity_decode opens any issues with security since I'm specifying ENT_QUOTES which means php will only convert the quotations. And I would think you'd need a lot more than quotes in order to present a security risk.

/ * Begin Signature */
It's a strange thing about determined seekers-after-wisdom that, no matter where they happen to be, they'll always seek that wisdom which is a long way off. Wisdom is one of the few things that looks bigger the further away it is.