Forums / Developer / Displaying Apostrophes

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 :(

eZ debug

Timing: Jan 19 2025 01:11:19
Script start
Timing: Jan 19 2025 01:11:19
Module start 'content'
Timing: Jan 19 2025 01:11:20
Module end 'content'
Timing: Jan 19 2025 01:11:21
Script end

Main resources:

Total runtime1.4449 sec
Peak memory usage4,096.0000 KB
Database Queries215

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0092 588.9297180.8438
Module start 'content' 0.00921.3131 769.7734718.1172
Module end 'content' 1.32230.1225 1,487.8906340.4609
Script end 1.4448  1,828.3516 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00430.2982210.0002
Check MTime0.00160.1078210.0001
Mysql Total
Database connection0.00080.058510.0008
Mysqli_queries1.350493.45882150.0063
Looping result0.00240.16392130.0000
Template Total1.408297.520.7041
Template load0.00230.159920.0012
Template processing1.405997.299120.7029
Template load and register function0.00010.006610.0001
states
state_id_array0.00120.084610.0012
state_identifier_array0.00070.048420.0003
Override
Cache load0.00200.1381430.0000
Sytem overhead
Fetch class attribute can translate value0.00130.088060.0002
Fetch class attribute name0.00120.0845120.0001
XML
Image XML parsing0.00360.251260.0006
class_abstraction
Instantiating content class attribute0.00000.0033150.0000
General
dbfile0.00480.3307450.0001
String conversion0.00000.000530.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

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
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/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