ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

SAEF preview adding back slash.

August 13, 2010 3:20pm

Subscribe [2]
  • #1 / Aug 13, 2010 3:20pm

    o0S0o

    9 posts

    Whenever I hit preview in my SAEF, it’s adds a back slash before any quotation mark or apostrophe… like this \”.

    I’m guessing it’s a php issue, but I need php in this template to call the fields like this:

    <?php 
    
    if (isset($_POST['field_id_5'])) { 
    $field_id_5 = $_POST['field_id_5']; 
    } 
    
    else { 
    $field_id_5 = ''; 
    } 
    
    if (isset($_POST['field_id_6'])) { 
    $field_id_6 = $_POST['field_id_6']; 
    } 
    
    else { 
    $field_id_6 = ''; 
    }
    
    if (isset($_POST['field_id_24'])) { 
    $field_id_24 = $_POST['field_id_24']; 
    } 
    
    else { 
    $field_id_24 = ''; 
    }
    
    
    ?>

    Any ideas what I can do to fix this?

    Thanks.

  • #2 / Aug 17, 2010 7:58pm

    o0S0o

    9 posts

    Anyone know what’s going on? Maybe I need to clarify…

    Every time I click preview it adds additional back slashes. So if I type this:

    “Banana” or ‘Banana’

    and I hit Preview, it previews fine but in the text area it now shows:

    \“Banana\” or \‘Banana\’

    So if I hit Submit after previewing, it posts with the back slashes.

    If I hit Preview again with the slashes, it adds more with every preview click:

    \\“Banana\\” or \\‘Banana\\’

    Preview again:

    \\\\“Banana\\\\” or \\\\‘Banana\\\\’


    This becomes a problem especially with users posting embedded videos like YouTube where there are several quotation marks.

  • #3 / Oct 15, 2010 3:37pm

    I’m having the same problem using a regular html form embedded in an EE template and processed using PHP. Is this something EE automatically does to POST vars?

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases