BP Group Documents
backslash before double quotes (4 posts)

  1. crashtest
    Posted 12 months ago #


    when i write something between double quotes in a document description, i get a backslash in front of them, example:

    i write "the street"

    then i see in documents list \"the street\" as description

    This doesn't happen in other pages or posts of the theme (WPMLS)


  2. lenasterg
    Plugin Author

    Posted 10 months ago #

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

  3. jreeve
    Posted 5 months ago #

    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.

  4. jreeve
    Posted 5 months ago #

    Hi lenasterg,

    I fixed this issue in a pull request here:


    Let me know if it works for you.


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




You must log in to post.

About this Plugin

About this Topic


No tags yet.