On Oct 3, 7:30 pm, Chambrln <[EMAIL PROTECTED]> wrote:
> There is a ticket opened for this problem but it was converted to an
> Enhancement instead of a bug and nothing appears to have been done
> about it. If you use the HTML helper to set your DOCTYPE and want
> your page to validate here is a workaround until this is fixed.
>
> In your /cake/libs/view/helpers/html.php change your docType function
> to the following.
>
> function docType($type = 'xhtml-strict') {
> if (isset($this->__docTypes[$type])) {
> if ($type == 'html4-strict')
> {
> foreach ($this->tags as $id=>$value)
> {
> $this->tags[$id] = str_replace('/>',
> '>', $value);
> }
> }
>
> return $this->output($this->__docTypes[$type]);
> }
> }
>
> I have yet to encounter any problems with this and the page now
> validates.
I haven't tried this but I might say if you are going to replace the /
> you may as well drop the space as well so your code would read as
follows:
$this->tags[$id] = str_replace(' />', '>', $value);
Just to beatify and make pretty. I have done this same thing with a
CMS though and it works fine as I too am a fan of 4.01 Strict.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---