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.

Published September 20, 2006 · Updated September 20, 2006
Categorized as CakePHP
Short URL: https://snook.ca/s/701

Conversation

2 Comments · RSS feed
Billy Criswell said on February 06, 2007

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 original tags.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

Jan from thrusites design said on August 14, 2007

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.

Sorry, comments are closed for this post. If you have any further questions or comments, feel free to send them to me directly.