Fix for crash when trying to use long html code as file name