[Plugin: Advanced Events Registration] CSV & Excel export filename with spaces
-
I’m using the pro version.
I noticed in Firefox 3.6.3, clicking CSV or Excel to export a list of attendees would break the filename if the event name includes spaces.
For example, the event “2010 Chili Cookoff” would be presented for download as “‘2010”, with the leading single quote followed by the first whole word.
In \event_regis.php, this line defines filename:
$filename = $event_name."-Payments_". $today ;
… and this line writes the header
header("Content-Disposition: attachment; filename='" .$filename .".csv'");
I replaced the spaces with underscores to solve the issue. I think more sensitization should occur since event names may contain unfriendly characters (slashes, for example).
$filename = str_replace(" ", "_", $event_name)."-Payments_". $today ;
http://wordpress.org/extend/plugins/advanced-events-registration/
- The topic ‘[Plugin: Advanced Events Registration] CSV & Excel export filename with spaces’ is closed to new replies.