Howto recode & to & in ez?

Author Message

K259

Tuesday 11 October 2005 5:39:02 am

Cause:

"&" in HTML is a special character to note the beginning of a entity, like "&nbsp".
In XHTML, a entity must also end by a ";", for example " "
Solution:

Please replace "&" by "&"

BAD    Smith & son
GOOD   Smith & son

Does anyone know how I can do this consequent in ez?

Kåre Køhler Høvik

Wednesday 12 October 2005 7:04:16 am

Hi

The wash template operator ( http://ez.no/doc/ez_publish/technical_manual/3_6/reference/template_operators/strings/wash ) will automaticly convert all HTML enteties, example : & to & .

Kåre Høvik

K259

Thursday 13 October 2005 12:45:00 am

This will also work in a

$node.data_map.creator

where creator is a concationation of firstname and lastname, and not an xml field?

Gabriel Ambuehl

Thursday 13 October 2005 12:48:57 am

From what I understand, yes. The concatenation should simply yield a string which can be fed to wash.

Visit http://triligon.org

Kåre Køhler Høvik

Thursday 13 October 2005 3:44:53 am

The wash operator will work on all kind of strings. Add <i>|wash</i> to use it. Example :

{"Tom & Jerry "|wash} {* Tom &amp; Jerry *}

Kåre Høvik

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 15:58:34
Script start
Timing: Jan 18 2025 15:58:34
Module start 'layout'
Timing: Jan 18 2025 15:58:34
Module start 'content'
Timing: Jan 18 2025 15:58:35
Module end 'content'
Timing: Jan 18 2025 15:58:35
Script end

Main resources:

Total runtime0.9153 sec
Peak memory usage4,096.0000 KB
Database Queries65

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0090 589.0469152.6250
Module start 'layout' 0.00900.0032 741.671939.4453
Module start 'content' 0.01220.9020 781.1172585.4531
Module end 'content' 0.91420.0011 1,366.570312.1641
Script end 0.9153  1,378.7344 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00490.5391160.0003
Check MTime0.00150.1667160.0001
Mysql Total
Database connection0.00180.194110.0018
Mysqli_queries0.865394.5314650.0133
Looping result0.00050.0598630.0000
Template Total0.877195.820.4386
Template load0.00360.393320.0018
Template processing0.873595.430120.4367
Template load and register function0.00010.015610.0001
states
state_id_array0.00290.313410.0029
state_identifier_array0.00120.129820.0006
Override
Cache load0.00320.3497190.0002
Sytem overhead
Fetch class attribute can translate value0.00060.064330.0002
Fetch class attribute name0.00080.089560.0001
XML
Image XML parsing0.00060.061130.0002
class_abstraction
Instantiating content class attribute0.00000.001670.0000
General
dbfile0.00060.0664150.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
5content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
3content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
6content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
2content/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: 18
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs