Serve HTML instead of XHTML
If there's one thing I don't like about some systems, it's their strict compliance to one standard or the other. Case in point is WordPress that locks you into using XHTML (unless you change it on the fly).
I was worried that CakePHP may have done the same but as it turns out, there's a handy file in /cake/config/ called tags.ini.php. Copy that file into /apps/config/ and edit the items in there to use the HTML syntax. Now your helpers should output using HTML instead of XHTML.
Conversation
If you happen to be looking for the
tags.ini.php
file in/cake/config/
and can't seem to find it, don't worry! It just means you're using a newer version.What's now used is a
$tags
array which stores all of this formatting.This array is located at
/cake/libs/view/helper.php
(which does not make much sense to me).You may still use your own
tags.ini.php
file in your application by placing it in/app/config/
but good luck figuring out the syntax without the originaltags.ini.php
there. This link may be helpful. I am not sure how how accurate it is though:https://trac.cakephp.org/browser/branches/1.1.x.x/cake/config/tags.ini.php?rev=3261
Well, using XHTML has many advantages in comparison to HTML. Moreover, XHTML is newer than HTML and is supported by many devices which don't support older HTML standards.
I switched to XHTML from HTML long time ago, but that "switch" took me 1 day only.