[support] sanitizing text box input for sql searches (custom search)

Greg Knaddison greg.knaddison at gmail.com
Wed Mar 3 13:49:48 UTC 2010


On Wed, Mar 3, 2010 at 6:33 AM, Michel Morelli <michel at ziobuddalabs.it> wrote:
>
> Yes. If you need to display only an item content you can use "check_markup".
> node_load()+check_markup it's more quick than a node_view() (for a single or
> few node's items).
> In all other case node_view is the right choice.
>

I think you simplify too much. The check_markup solution will only
display content in the $node->body and it doesn't allow other modules
on the site to do the normal overriding that they might do (many
modules work that way) so I consider the check_markup solution only a
solution for very specific sites. Further, it doesn't render any cck,
location, or other fields that might normally appear in a "node's
content."

If someone is building a general module they should use node_view (or
copy the code from node_view and alter appropriately).

Regards,
Greg

-- 
Greg Knaddison | 303-800-5623 | http://growingventuresolutions.com
Mastering Drupal - http://www.masteringdrupal.com


More information about the support mailing list