bxxx | 4 Oct 2011 17:21
Picon
Favicon

sanitize all value of Query

 

Hello,
I would like sanitize (with function html_escape for exemple) all value of query.

How each recursively to a final value ?

thx

__._,_.___
Recent Activity:
    .

    __,_._,___
    Brandon Long | 6 Oct 2011 00:46
    Favicon

    Re: sanitize all value of Query

     

    <?cs def:sanitize(param) ?>
    <?cs set:param = html_escape(param) ?>
    <?cs each:sub = param ?>
    <?cs call:sanitize(sub) ?>
    <?cs /each ?>
    <?cs /def ?>

    <?cs each:param = Query ?>
    <?cs call:sanitize(param) ?>
    <?cs /each ?>

    or something like that. Note, you may be better off just using the
    right escaping whenever you use a Query variable instead of trying to
    sanitize them all up front. You'd be even better off using the
    auto-escaping code that's in the unreleased 0.11 code base in the SVN
    tree on code.google.com

    Brandon

    On Tue, Oct 4, 2011 at 8:21 AM, bxxx <vincebouix <at> yahoo.fr> wrote:
    > Hello,
    > I would like sanitize (with function html_escape for exemple) all value of query.
    >
    > How each recursively to a final value ?
    >
    > thx
    >
    >
    >
    >
    >
    > ------------------------------------
    >
    > Yahoo! Groups Links
    >
    >
    >
    >

    __._,_.___
    Recent Activity:
      .

      __,_._,___

      Gmane