Results 1 to 4 of 4
  1. #1
    Join Date
    Jan 2003
    Location
    UK
    Posts
    27

    Unanswered: Disable automatic escaping via transit

    When processing a form php will automatically escape (i.e. put a \ infornt of) special reservered characters such as " ...

    i.e.

    "hello"

    would be passed via the url as

    \"hello\"

    does anyone know how to set it so that this facilitly is disabelled.?

    as i am passing the pages source code as a variable to another page which creates a file with it...... any suggestions

    Cheers
    Phil

  2. #2
    Join Date
    Feb 2003
    Location
    Germany
    Posts
    20
    use for that page something like the following:

    Code:
    function output_handler(& $buffer) {
        return str_replace(
            array("\r\n","\n","'"),
            array('\n','\n','\''),
            $buffer);
    }
    
    ob_start('output_handler');
    
    <your output>
    
    ob_end_flush();

  3. #3
    Join Date
    Jan 2003
    Location
    UK
    Posts
    27
    Sorry don't follow can you give an example / elaborate

    cheers
    phil

  4. #4
    Join Date
    Dec 2002
    Posts
    65
    Try checking the php manual for magic_quotes_gpc and/or magic_quotes_runtime, that's most likely what you're looking for. It automatically escapes chars for get, post and cookie vars (hence, the gpc). Try adjusting the settings for these with ini_set();

    -b
    (I'm only available at the email address provided in my profile on weekdays, if you have questions or advice, during off hours use AIM). Also any views I provide here or on my website are mine and not representative of any views of my work, family, friends and sometimes even myself.

    http://www.bcyde.com

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •