dglee87 / get-simple-cms

Automatically exported from code.google.com/p/get-simple-cms
GNU General Public License v3.0
0 stars 0 forks source link

Replace whitespace in filenames in upload and filebrowser links #169

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Currently, if file name has whitespace, it will be included in src tags as it 
is. It is recommended to replace it with %20 in links. Also, this should be 
done when including link from filebrowser.php to article, so user will get 
valid code for his website.

Original issue reported on code.google.com by jos...@gmail.com on 17 Mar 2011 at 9:27

GoogleCodeExporter commented 9 years ago

Original comment by jos...@gmail.com on 17 Mar 2011 at 9:28

GoogleCodeExporter commented 9 years ago
isnt that just as simple as running the string thru urlencode()?

Also, which files are you speaking of? I guess if a file is loaded via FTP, the 
name isn't cleaned, but if its loaded via Uploadify, etc. the filename should 
be cleaned with clean_img_name();

Original comment by ccagle8 on 17 Mar 2011 at 12:18

GoogleCodeExporter commented 9 years ago
Yes, rawurlencode() should do the trick. And if names are cleaned up while 
uploading using GetSimple uploaders - then this issue is not very important.

Original comment by jos...@gmail.com on 17 Mar 2011 at 12:27

GoogleCodeExporter commented 9 years ago

Original comment by ccagle8 on 17 Mar 2011 at 1:32

GoogleCodeExporter commented 9 years ago
just noticed this issue. Please do not forget to strip special chars from 
uploaded files as well. Array with char conversion should be taken from 
translation files.
I insist of embedding the code of slug Transliteration plugin, as GS had always 
problems with special chars in other languages as well.
But haven't tested this issue in r398.

Original comment by jo...@tlen.pl on 18 Mar 2011 at 9:32

GoogleCodeExporter commented 9 years ago
Forgot to add: when it goes to file names and generated links, they are 
converted into entities, thus links are broken.

Original comment by jo...@tlen.pl on 18 Mar 2011 at 9:32

GoogleCodeExporter commented 9 years ago
removing special chars fixed in r404

Original comment by ccagle8 on 19 Mar 2011 at 6:14

GoogleCodeExporter commented 9 years ago
Since this appears to be working, can't this issue be closed?

Original comment by kimausloos@gmail.com on 6 Apr 2011 at 4:17

GoogleCodeExporter commented 9 years ago
filename whitespace is still an issue if you upload a file via FTP instead of 
using the Upload tool within the CMS

Original comment by c...@3pcmedia.com on 6 Apr 2011 at 5:36

GoogleCodeExporter commented 9 years ago
This issue was closed by revision r450.

Original comment by ccagle8 on 8 Apr 2011 at 12:40