Development

#2083 (Cache informations in dev mode are not XHTML strict compliant)

You must first sign up to be able to contribute.

Ticket #2083 (closed defect: fixed)

Opened 3 years ago

Last modified 2 years ago

Cache informations in dev mode are not XHTML strict compliant

Reported by: COil Assigned to: Carl.Vondrick
Priority: minor Milestone:
Component: cache Version: 1.0.11
Keywords: dev, cache, xhtml Cc:
Qualification: Ready for core team

Description

- escape the "&" - Id of a div element should not start with a number but with a letter

Attachments

sfWebDebug.class.php.patch (1.2 kB) - added by Carl.Vondrick on 02/23/08 20:08:58.
Patch to comply with XHTML 1.0 strict standards in cache information in web debug

Change History

08/08/07 15:28:29 changed by superhaggis

Personally, I don't think XHTML compliance is really necessary for the development environment as the public won't see it; production environments shouldn't have dev controllers available.

08/08/07 16:29:20 changed by COil

I agree, but when developping it is quiet annoying because i must check all the errors to see wether they come from my html or the generated htlm of the cache infos. (using html validator) and i suppose it would not be very hard to correct ?

02/23/08 03:34:33 changed by Carl.Vondrick

  • status changed from new to closed.
  • resolution set to worksforme.
  • qualification set to Unreviewed.

Both symfony 1.0 and symfony 1.1 validate against XHTML 1.0 Strict using W3's validator with the debug toolbar active.

02/23/08 12:00:14 changed by FabianLange

  • version changed from 1.0.3 to 1.0.11.

Hi Carly, no it is correct. The small div that displays the cache information in debug mode is not valid XHTML:

      <div id="main_3effb7b63927bfa54a7866e2bc5b032c" class="sfWebDebugActionCache" style="border: 1px solid #f00">
      <div id="sub_main_3effb7b63927bfa54a7866e2bc5b032c" class="sfWebDebugCache" style="background-color: #9ff; border-right: 1px solid #f00; border-bottom: 1px solid #f00;">
      <div style="height: 16px; padding: 2px"><a href="#" onclick="sfWebDebugToggle('3effb7b63927bfa54a7866e2bc5b032c'); return false;"><strong>cache information</strong></a>&nbsp;<a href="#" onclick="sfWebDebugToggle('sub_main_3effb7b63927bfa54a7866e2bc5b032c'); document.getElementById('main_3effb7b63927bfa54a7866e2bc5b032c').style.border = 'none'; return false;"><img src="/sf/sf_web_debug/images/close.png" alt="Close" /></a>&nbsp;</div>
        <div style="padding: 2px; display: none" id="3effb7b63927bfa54a7866e2bc5b032c">
        [uri]&nbsp;@sf_cache_partial?module=news&action=_portalNews&sf_cache_key=0<br />

        [life&nbsp;time]&nbsp;3600&nbsp;seconds<br />
        [last&nbsp;modified]&nbsp;0&nbsp;seconds<br />
        &nbsp;<br />&nbsp;
        </div>

you see this violates in the uri:

        [uri]&nbsp;@sf_cache_partial?module=news&action=_portalNews&sf_cache_key=0<br />
}}} where & is not &amp;

as well as ids starting with a letter
{{{
        <div style="padding: 2px; display: none" id="3effb7b63927bfa54a7866e2bc5b032c">
}}}

02/23/08 20:08:58 changed by Carl.Vondrick

  • attachment sfWebDebug.class.php.patch added.

Patch to comply with XHTML 1.0 strict standards in cache information in web debug

02/23/08 20:09:41 changed by Carl.Vondrick

  • qualification changed from Unreviewed to Ready for core team.

Patch attached for both 1.0 and 1.1. &'s were already properly escaped.

02/23/08 23:18:01 changed by fabien

  • status changed from closed to reopened.
  • resolution deleted.

02/24/08 00:14:26 changed by Carl.Vondrick

  • owner changed from fabien to Carl.Vondrick.
  • status changed from reopened to new.

In r7547, r7592, r7593. Please confirm that this fixes it.

03/06/08 01:23:27 changed by COil

Tested, works for me.

03/08/08 15:37:24 changed by Carl.Vondrick

  • status changed from new to closed.
  • resolution set to fixed.

The Sensio Labs Network

Since 1998, Sensio Labs has been promoting the Open-Source software movement by providing quality web application development, training, consulting.
Sensio Labs also supports several large Open-Source projects.