Posted on 25 January 2009, 7:16 pm, by klenwell, under
Code Case.
Problem I need to validate input from a textarea field. I want to allow a few tags, like a, i, b, etc. But everything else needs to be filtered out. And the input should be checked to see that its is nested properly. Overview User input sanitization and validation is one of those things that [...]
Posted on 17 January 2009, 11:05 am, by klenwell, under
Code Case.
I wanted to use the CakePhp pagination helper to paginate some complex records. The model that the paginator was referencing had both belongsTo and hasMany associations. belongsTo associations are not a problem. hasMany, I discovered, are — which makes sense when I think about. As the ticket notes: You can only paginate LEFT JOIN tables [...]
Posted on 10 January 2009, 10:46 am, by klenwell, under
Code Case.
In HTML forms, I generally prefer radio groups over select menus. One advantage select elements have over radio groups is a smaller visual footprint. A long radio list takes up a lot more screen room than a long select list. One way to make a radio list more efficient is to break it up into [...]