WordPress.org

Support

Support » Plugins and Hacks » backslash before double quotes

backslash before double quotes

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author lenasterg
    Participant

    @lenasterg

    @crashtest, Thanks for reporting.
    Will fix it in the next release.

    Hi lenasterg,

    Here’s some more of what I discovered about this bug:

    – Double quotes, single quotes, and apostrophes are escaped with backslashes, and the backslashes appear in the final display. Ampersands and other punctuation (from what I’ve tested) don’t seem to be affected.
    – The data that’s sent from the browser isn’t escaped in this way, but $_POST is getting the escaped version, so it must be something with PHP that’s causing this, unless something happens to the $_POST in bp-group-documents that I haven’t discovered.
    – Some writing about this (like this stackoverflow thread) suggests that this has something to do with PHP magic quotes, yet I seem to have this disabled, and I’m still seeing this behavior. Running get_magic_quotes_gpc() on my install returns false.
    – there are a few lines in templatetags.php that see to address the magic quote scenario, yet they rely on get_magic_quotes_gpc(), which is returning false in my case.
    – removing the line that starts if (get_magic_quotes will properly strip backslashes from the titles of files, but not from descriptions.

    Hope this helps.

    Hi lenasterg,

    I fixed this issue in a pull request here:

    https://github.com/wp-plugins/bp-group-documents/pull/2

    Let me know if it works for you.

    Crashtest,

    Feel free to download my patched version, which should fix your problem:

    https://github.com/mlaa/bp-group-documents/tree/escaping-fix

    -Jonathan

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘backslash before double quotes’ is closed to new replies.