Forums / Developer / Trouble with "--" in the article titles

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

eZ debug

Timing: Jan 18 2025 16:02:57
Script start
Timing: Jan 18 2025 16:02:57
Module start 'content'
Timing: Jan 18 2025 16:02:57
Module end 'content'
Timing: Jan 18 2025 16:02:58
Script end

Main resources:

Total runtime1.0495 sec
Peak memory usage4,096.0000 KB
Database Queries194

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0063 588.8672180.8281
Module start 'content' 0.00630.8844 769.6953504.5078
Module end 'content' 0.89080.1587 1,274.2031333.5000
Script end 1.0495  1,607.7031 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00420.4048210.0002
Check MTime0.00160.1549210.0001
Mysql Total
Database connection0.00090.081310.0009
Mysqli_queries0.982393.59781940.0051
Looping result0.00170.16271920.0000
Template Total1.019397.120.5096
Template load0.00220.206620.0011
Template processing1.017196.913220.5086
Template load and register function0.00020.020610.0002
states
state_id_array0.00080.072110.0008
state_identifier_array0.00120.110420.0006
Override
Cache load0.00180.1726280.0001
Sytem overhead
Fetch class attribute can translate value0.00120.112230.0004
Fetch class attribute name0.00110.100830.0004
XML
Image XML parsing0.00050.047930.0002
class_abstraction
Instantiating content class attribute0.00000.000730.0000
General
dbfile0.00140.1363210.0001
String conversion0.00000.000630.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

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
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/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