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.

eZ debug

Timing: Jan 18 2025 19:22:43
Script start
Timing: Jan 18 2025 19:22:43
Module start 'layout'
Timing: Jan 18 2025 19:22:43
Module start 'content'
Timing: Jan 18 2025 19:22:44
Module end 'content'
Timing: Jan 18 2025 19:22:44
Script end

Main resources:

Total runtime0.6141 sec
Peak memory usage4,096.0000 KB
Database Queries57

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0067 589.3516152.6250
Module start 'layout' 0.00670.0027 741.976639.4609
Module start 'content' 0.00950.6032 781.4375499.4297
Module end 'content' 0.61270.0014 1,280.867212.1563
Script end 0.6141  1,293.0234 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00320.5256160.0002
Check MTime0.00130.2120160.0001
Mysql Total
Database connection0.00140.229110.0014
Mysqli_queries0.562991.6641570.0099
Looping result0.00060.0942550.0000
Template Total0.582094.820.2910
Template load0.00210.349520.0011
Template processing0.579894.414420.2899
Template load and register function0.00020.039110.0002
states
state_id_array0.00100.155010.0010
state_identifier_array0.00080.127320.0004
Override
Cache load0.00180.2968280.0001
Sytem overhead
Fetch class attribute can translate value0.00070.119220.0004
Fetch class attribute name0.00270.439230.0009
XML
Image XML parsing0.00030.043020.0001
class_abstraction
Instantiating content class attribute0.00000.002130.0000
General
dbfile0.00070.1066100.0001
String conversion0.00000.001340.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
3content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.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/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 14
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs