& a m p ; problem

Author Message

b j

Tuesday 23 May 2006 11:29:02 am

I need some hint. All special characters, that are in my XML fields, are translated wrong (by double &) how to avoid it? I want to get for example å , so I write "& a r i n g;" and as an effect I got & a m p;a r i n g in my webbrowser so it is displayed as å WRONG!!

Help.....

b j

Tuesday 23 May 2006 11:33:02 am

The same problem exist here.... hm...

b j

Tuesday 23 May 2006 11:47:04 pm

help? it is not working still...

how to enforce EZ to not store & aring; as a & amp;aring ??

b j

Thursday 25 May 2006 2:36:04 am

so the only way is to change the file: ezsimplifiedxmlinput.php ?

if ( $tagName == 'literal' )
{
$tagContent = $childTag->content();
$tagContent =& str_replace("&lt;", "<", $tagContent );
$tagContent =& str_replace("&gt;", ">", $tagContent );
$tagContent =& str_replace("&apos;", "'", $tagContent );
$tagContent =& str_replace("&quot;", '"', $tagContent );
$tagContent =& str_replace("&amp;", "&", $tagContent );
$childTagText .= $tagContent;
}

I will explain my problem again:

I added the norwegian translation to my article. I'm using a XML field for text of an article. When I put there some norwegian text, for example:

"
Du kan prøve å skrive inn sidens adresse på nytt, eller forsøke å finne den via søkefeltet under
"

I got always that stupid & a m p ! It makes me sick!!!

Help....

b j

Thursday 25 May 2006 2:41:52 am

grrr

Kristof Coomans

Thursday 25 May 2006 6:07:00 am

Hi bj

So you want to have å in your text? (exactly like it is displayed here now)
Just type that character then, and make sure your eZ publish site is using the right charset (I would recommend to use utf-8 from the beginning).

independent eZ Publish developer and service provider | http://blog.coomanskristof.be | http://ezpedia.org

b j

Friday 26 May 2006 2:20:23 am

Problem is that only way for me is copy/paste from MSWORD, so I cannot write anything like that from keyboard. Im using the english keyboard and just trying to add the norwegian translation of some article. After I coppied it to XML field it parsed by EZ to that form of &something. That was a problem...

Anyway, I solved it by changing the sourcecode... But I'm not sure its safe...

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 18 2025 19:05:46
Script start
Timing: Jan 18 2025 19:05:46
Module start 'layout'
Timing: Jan 18 2025 19:05:46
Module start 'content'
Timing: Jan 18 2025 19:05:47
Module end 'content'
Timing: Jan 18 2025 19:05:47
Script end

Main resources:

Total runtime0.6615 sec
Peak memory usage4,096.0000 KB
Database Queries69

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0076 588.9219152.6094
Module start 'layout' 0.00760.0039 741.531339.4141
Module start 'content' 0.01150.6485 780.9453575.3594
Module end 'content' 0.66000.0015 1,356.304716.1875
Script end 0.6615  1,372.4922 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00360.5437160.0002
Check MTime0.00160.2358160.0001
Mysql Total
Database connection0.00100.146710.0010
Mysqli_queries0.601990.9951690.0087
Looping result0.00070.1010670.0000
Template Total0.626694.720.3133
Template load0.00190.285120.0009
Template processing0.624794.432620.3123
Template load and register function0.00030.043410.0003
states
state_id_array0.00080.118810.0008
state_identifier_array0.00160.241120.0008
Override
Cache load0.00160.2402300.0001
Sytem overhead
Fetch class attribute can translate value0.00130.194620.0006
Fetch class attribute name0.00160.247080.0002
XML
Image XML parsing0.00070.101720.0003
class_abstraction
Instantiating content class attribute0.00000.003180.0000
General
dbfile0.00120.1858160.0001
String conversion0.00000.001540.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/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
1content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
2content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 23
 Number of unique templates used: 7

Time used to render debug report: 0.0001 secs