Displaying Apostrophes

Author Message

Mahesh Arvind

Thursday 08 January 2004 10:37:29 pm

Hi

I am displaying an article. There is a sentence in which the word North America's comes. In IE browser it is displayed as North America's , but in Mozilla it is displayed correctly. Can anyone tell what could be the problem?

Thanks.
Mahesh

Thanks & Regards
Mahesh

Alex Jones

Friday 09 January 2004 6:24:25 am

Mahesh, odds are the problem is due to the source of the article. Was it copied from Word, or another text editor? If so, you may have pasted an extended character which eZ publish is translating into the '. I would recommend that you replace the apostrophe with a single quote (') which is safe to use.

Alex

Alex
[ bald_technologist on the IRC channel (irc.freenode.net): #eZpublish ]

<i>When in doubt, clear the cache.</i>

Mahesh Arvind

Saturday 10 January 2004 12:46:27 am

Hi Alex,
Sorry about the use of "apostrophes". Actually, I am usng a single quote (') in the article. IE displays this as &apos; In fact, in mozilla the display is coming correctly.
While I use (`) there is no problem. It displays this correctly.
I had pasted the article from Notepad. I had viewed the page source. It's like this "North America&apos;s" in both Mozilla and IE. Mozilla displays it correctly as "North Ameica's", but it's not coming in IE. Is this a problem with IE? Any ideas?

Mahesh

Thanks & Regards
Mahesh

Marco Zinn

Saturday 10 January 2004 4:44:31 am

Hi, looks like ez renders the apostrophe to &apos; , which looks like the correct HTML entity for that character.
As Mozilla display it correctly, it seems to be "good HTML". So, yes, it's a "problem" with IE.
But as 90% of the world is using IE, that won't help you. M$ is setting standards :( I suggest, that you post a bug report (type "enhancement") and request, that ez renders the apostroph to something, that all current browsers can display.
(BTW: There are some more HTML entities, which one browser, but not all, can display, like the TM-Sign).

Marco
http://www.hyperroad-design.com

Mahesh Arvind

Monday 12 January 2004 2:36:53 am

Hi,

IE displays it correctly when we use the following code to fetch.
{$node.data_map.caption.content.output.output_text}

But,{$node.data_map.caption.data_text} still has a problem.

Thanks.

Thanks & Regards
Mahesh

Dominik Pich

Monday 12 January 2004 6:28:40 am

http://fishbowl.pastiche.org/2003/07/01/the_curse_of_apos

Alex Jones

Monday 12 January 2004 6:55:54 am

Mahesh, I should have noticed the problem sooner. When you use '{$node.data_map.caption.data_text}', you are displaying the raw XML. When you use '{$node.data_map.caption.content.output.output_text}' you are displaying the rendered XML via the template, so it displays the proper characters for HTML. Glad you found the solution.

Alex

Alex
[ bald_technologist on the IRC channel (irc.freenode.net): #eZpublish ]

<i>When in doubt, clear the cache.</i>

Dariusz Wlodarczyk

Wednesday 21 January 2004 4:08:09 pm

this is content of my templates/content/view/ezxmltext.tpl

{$attribute.content.output.output_text}

but I have displayed &Oslash; in place of correct character :(

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.