filler00 / etcg

Tradepost Management Script
22 stars 8 forks source link

Cards with Spaces don't upload correctly. #13

Open dite opened 8 years ago

dite commented 8 years ago

At the moment, it seems like cards with spaces in them (such as mc-Cassandra Jane), give errors when trying to upload--file_get_contents doesn't seem to work well with spaces. The quickfix I came up with was changing adding rawurlencode for the card:

class_lib.php > Line 239: $imgurl = ''.$defaultauto.''.rawurlencode($card).'.'.$format.'';

I haven't done enough research to see if it's the BEST way to do it, but it worked (since it only applied to $imgurl, it sends it out in a way file_get_contents understands (with %20 instead of spaces), but saves it with the original name.