[wp-hackers] Quick question about sanitize_file_name
fris
fris at fris.net
Fri Feb 17 22:05:42 UTC 2012
You could trim the curly quotes from the filename string
-----Original Message-----
From: wp-hackers-bounces at lists.automattic.com
[mailto:wp-hackers-bounces at lists.automattic.com] On Behalf Of Nathaniel
Taintor
Sent: Friday, February 17, 2012 3:53 PM
To: wp-hackers at lists.automattic.com
Subject: [wp-hackers] Quick question about sanitize_file_name
I've been trying to generate filenames for some uploaded files using
sanitize_file_name, and come across some weirdness when the string passed to
sanitize_file_name has curly quotes or apostrophes - they don't get stripped
out, which causes errors when using them as HTML entities.
Is this expected behaviour, or should the list of special characters be
expanded to include curly quotes?
Happy to open a trac ticket if its something overlooked... just wanted to
see if I'm doing something wrong first. (I worked around it by passing the
filename without extension through santizte_title_with_dashes, then adding
the extension and passing that through sanitize_file_name.)
Nathaniel Taintor, Designer/Developer
*Golden Apples Design*
http://goldenapplesdesign.com
@GoldenApples | 717.434.3226
goldenapplesdesign at gmail.com
_______________________________________________
wp-hackers mailing list
wp-hackers at lists.automattic.com
http://lists.automattic.com/mailman/listinfo/wp-hackers
More information about the wp-hackers
mailing list