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.

eZ debug

Timing: Jan 19 2025 03:30:09
Script start
Timing: Jan 19 2025 03:30:09
Module start 'layout'
Timing: Jan 19 2025 03:30:09
Module start 'content'
Timing: Jan 19 2025 03:30:10
Module end 'content'
Timing: Jan 19 2025 03:30:10
Script end

Main resources:

Total runtime0.9714 sec
Peak memory usage4,096.0000 KB
Database Queries78

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0070 589.1563152.6250
Module start 'layout' 0.00700.0032 741.781339.4297
Module start 'content' 0.01030.9591 781.2109713.0391
Module end 'content' 0.96930.0021 1,494.250020.1875
Script end 0.9714  1,514.4375 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00350.3641160.0002
Check MTime0.00140.1488160.0001
Mysql Total
Database connection0.00120.126310.0012
Mysqli_queries0.888791.4864780.0114
Looping result0.00080.0808760.0000
Template Total0.932896.020.4664
Template load0.00250.257320.0012
Template processing0.930295.762420.4651
Template load and register function0.00010.009310.0001
states
state_id_array0.00130.137010.0013
state_identifier_array0.00300.311720.0015
Override
Cache load0.00200.2110430.0000
Sytem overhead
Fetch class attribute can translate value0.00060.061050.0001
Fetch class attribute name0.00220.2303120.0002
XML
Image XML parsing0.00210.217450.0004
class_abstraction
Instantiating content class attribute0.00000.0031150.0000
General
dbfile0.00130.1335340.0000
String conversion0.00000.001040.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
7content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
8content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
10content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
4content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 31
 Number of unique templates used: 6

Time used to render debug report: 0.0002 secs