WordPress.org

Ready to get started?Download WordPress

Forums

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

  1. vgf62
    Member
    Posted 2 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 0.2.9.18.

    Thanks!

    http://wordpress.org/extend/plugins/wp-filebase/

  2. Fabian
    Member
    Plugin Author

    Posted 2 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
    Member
    Posted 2 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

Tags

No tags yet.