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.

WP-Filebase Download Manager
[resolved] issue with apostrophe in the file name (3 posts)

  1. vgf62
    Posted 4 years ago #

    Hi Fabi,
    Your plugin is really great and it fits my needs but I’d like you to fix a little bug:
    when I submit a file using the file browser with an apostrophe (‘) in the file name the link stored in the db is broken as a backslash is added before the apostrophe.
    Please note that if I upload the same file using an FTP client and then use the Sync function everything is fine.
    It seems like a stripslashes is missing somewhere in the code...
    I’m using WP 3.4 (ITA) with your latest release



  2. Fabian
    Plugin Author

    Posted 4 years ago #

    Try editing Admin.php:
    at line 526:
    $file_name = $upload ? $data->file_upload['name'] : ((empty($file_src_path) && $update) ? $file->file_name : basename($file_src_path));

    replace with

    $file_name = $upload ? str_replace('\\','',$data->file_upload['name']) : ((empty($file_src_path) && $update) ? $file->file_name : basename($file_src_path));

    Does this work for you?

  3. vgf62
    Posted 4 years ago #

    Yes, it works!
    You're a star, thank you! ;-)

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic


No tags yet.