Forum

You must be logged in to post Login Register

Search Forums:


 






Apostrophe in filename

How do I?
UserPost

11:15 pm
17 October, 2009


fberardi

Member

posts 7

Is using the apostrophe in a filesname still not working? I can avaoid it MOST of the time, but users are constantly trying to name a file with "God's" in the name (no quotes) and it does not show in the filelist to add.

Thanks again for the awesome sermon-browser!!

6:22 am
25 April, 2010


Bruce

Sidney BC Canada

New Member

posts 1

Added a sermon with an apostrophe in the title and now when I view the sermons, it adds another copy and I cannot delete the copies. We have renamed the sermon to get it working, however we have two sermons with multiple copies I cannot remove.

8:07 pm
25 April, 2010


Ben Miller

Appleton, WI, USA

Guru

posts 198

Bruce, I looked at you site, but I can't see an example of what you are talking about. Can you post a link to an example from your site?

Ben Miller
Pathways Church, Appleton, WI, USA

3:08 pm
6 May, 2010


EdPasternak

Member

posts 6

I had a similar problem. The only way I was able to resolve it was to do a rmdir at the command line to remove the directory which had the offending file then manually edit the SQL to delete the lines that it created.
The problem is that when PHP is reading the file it replaces the ' with a ' so ed's.mp3 turns into ed's.mp3. The operating systems see the as a directory and everything goes weird form there.
I have my files in a different directory then the default for the sermon browser. Uninstalling the sermon browser should eliminate the directory with the problem in it. I believe that there is also a checkbox option to remove uploaded files as well. So back up the database uninstall, reinstall, restore the database.

12:58 pm
14 June, 2010


jon

New Member

posts 1

The problem with the JavaScript deletion links can be fixed by wrapping

$file->name

in a call to

esc_js

.

Example of this is line 988 sb-includes/admin.php:

javascript:kill(<?php echo $file->id ?>, '<?php echo esc_js($file->name) ?>');

There are probably a few more places which need this work.

PS – looks like this was already attempted (sort of) with the JS confirm (same line as example)

str_replace("'", ", $file->name)

About the 4:14 evangelical christian theology blog forum

Most Users Ever Online:

30


Forum Stats:

Groups: 1

Forums: 6

Topics: 581

Posts: 2231




Popularity: 38% [?]