Trouble with "--" in the article titles

Author Message

Pascal France

Monday 24 July 2006 1:24:25 pm

Hi,

Since I upgrade to 3.7.6, I have a strange display on the public site each time I use "--" in article titles.

You can see this display à the bottom of this article (for example):

http://www.linuxorable.net/ez_publish/index.php/linuxorable/documentation_ez_publish/templates_modeles/template_basics_bases_sur_les_templates/node_templates_templates_de_n_ud
All articles which have a title which contains -- have this problem.
If I put just one "-" it works fine.
If I use "-->" it doesn't work but "->" do.

If I put "--" in a folder title, it works fine.

Regards

Pascal

Ce qui embellit le désert c'est qu'il cache un puits... quelque part... (A. de Saint-Exupéry) - http://luxpopuli.fr/eZ-Publish

Claudia Kosny

Saturday 12 August 2006 7:14:52 pm

Hello Pascal,

Check the HTML specification for comments (http://www.ietf.org/rfc/rfc1866.txt , section 3.2.5. Comments).

One the webpage you use {$node|attribute('show')} or something similar surrounded by an html comment. The problem is that a HTML comment already ends with two dashes (and _not_ with

-->

like most people seem to think), therefore everything after these two dashes is displayed on your webpage.

I assume that he same would happen with a folder with two dashes in the title providing you try to display the properties the same way.

Solution:
Remove the {$node|attribute('show')} from your template code. It is very useful on a test site, but on a live webpage this just consumes unnecessary processing power and makes the html code larger than necessary.

As the two dashes will only cause problems once there is an opened html comment, this should actually suffice. If you truly need to display the data this way the only way I can see right now is to make a string replace on the output and replace -- with their html entities.

Claudia

Pascal France

Monday 14 August 2006 3:50:48 am

Thanks Claudia,

You're absolutely right.

Pascal

Ce qui embellit le désert c'est qu'il cache un puits... quelque part... (A. de Saint-Exupéry) - http://luxpopuli.fr/eZ-Publish

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.