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.