That will work for some of the elements, but some of them are  ' %s/
>'  and I'm guessing the %s is used somewhere.  I'd have to do a
str_replace(' %s/>', '%s>', $value);  the extra space didn't cause a
problem with validation.  I don't like the look of the extra space,
but it wasn't enough to bother with for me.

On Oct 3, 7:37 pm, "Jay Gilmore (smashingjay)" <[EMAIL PROTECTED]>
wrote:
> 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 [email protected]
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to