valid HTML4 URLs in eZ

Author Message

Marko Žmak

Tuesday 11 September 2007 12:44:23 am

I was dealing with having one of my eZ sites pass the W3c validator (http://validator.w3.org/), and I came accross the problem of some URLs breaking the validity check. The problem is that these URLs have the ampersand ("&") in it. According to W3c specifications, the ampersand in the URL should be escaped with "&".
So I was wondering if there is an operator in eZ that would convert such a URL in a valid one?

Also I'm wondering what should I do to make this conversions in ALL the URLs in my site?
As far as I can think of now, I have to:

- convert the URLs that I display from my templates (e.g. the URL attribute of an object)
- convert the URLs that are embeded in XML attributes (override their templates)
- convert the static URL in my templates (hardcoded in the template code) if such exsist

This are all the possibilities of invalid URLs that I can think of for now. Does anyone have any other idea?

--
Nothing is impossible. Not if you can imagine it!

Hubert Farnsworth

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 21:10:56
Script start
Timing: Jan 18 2025 21:10:56
Module start 'layout'
Timing: Jan 18 2025 21:10:56
Module start 'content'
Timing: Jan 18 2025 21:10:57
Module end 'content'
Timing: Jan 18 2025 21:10:57
Script end

Main resources:

Total runtime1.1393 sec
Peak memory usage4,096.0000 KB
Database Queries46

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0091 589.0234152.6250
Module start 'layout' 0.00910.0047 741.648439.4453
Module start 'content' 0.01381.1239 781.0938475.3594
Module end 'content' 1.13770.0015 1,256.45318.1719
Script end 1.1392  1,264.6250 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00400.3503160.0002
Check MTime0.00190.1631160.0001
Mysql Total
Database connection0.00110.094310.0011
Mysqli_queries1.091395.7893460.0237
Looping result0.00080.0695440.0000
Template Total1.093296.020.5466
Template load0.00230.203220.0012
Template processing1.090895.746320.5454
Template load and register function0.00010.009410.0001
states
state_id_array0.00120.103410.0012
state_identifier_array0.00130.115420.0007
Override
Cache load0.00190.1668120.0002
Sytem overhead
Fetch class attribute can translate value0.00070.061310.0007
Fetch class attribute name0.00080.065820.0004
XML
Image XML parsing0.00050.046810.0005
class_abstraction
Instantiating content class attribute0.00000.000320.0000
General
dbfile0.00090.0805180.0001
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
1content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
3content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
3content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 10
 Number of unique templates used: 6

Time used to render debug report: 0.0002 secs