Support » Everything else WordPress » WordPress theme options

  • duffell



    Just wondering if anyone knew of a quick fix for an issue I’m having with a textarea within a theme options page.

    When I save the content within a textarea, wordpress seems to add a back slash \ to certain characters. Each time I save an additional slash is added.

    For example if i were to save

    href=”” when saved this would appear like href=\”\”

    Then wish each additional save the backslashes would duplicate so i could after time end up with href=\\\\\\\\”\\\\\\\\”

    The same applies for a few other characters.

    Has anyone encoutered this before ? and if so do you know of a magical cure.


Viewing 1 replies (of 1 total)
  • zenverse


    use stripslashes()

    for example:
    <textarea><?php echo $textarea_content; ?></textarea>

    change it to:
    <textarea><?php echo stripslashes($textarea_content); ?></textarea>

Viewing 1 replies (of 1 total)
  • The topic ‘WordPress theme options’ is closed to new replies.