WordPress.org

Forums

The Support Forums will be in read-only mode for a scheduled maintenance window on 01 September 2016 14:00 UTC - 20:00 UTC. More information.

BP Group Documents
backslash before double quotes (4 posts)

  1. crashtest
    Member
    Posted 2 years ago #

    Hi,

    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)

    https://wordpress.org/plugins/bp-group-documents/

  2. lenasterg
    Member
    Plugin Author

    Posted 2 years ago #

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

  3. jreeve
    Member
    Posted 1 year 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
    Member
    Posted 1 year ago #

    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

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • BP Group Documents
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic

Tags

No tags yet.