Mustache.swift calls URL(string:) when constructing file path. But it causes some crashes when the file name contains white space.
Generally, URL(fileURLWithPath:) is used to solve such problems, but this API is not available in Mustache.swift because it supports iOS 9+. Therefore, encode the URL path to be added beforehand to work around the problem.
fixes #72 and ref: #50
Mustache.swift calls
URL(string:)
when constructing file path. But it causes some crashes when the file name contains white space.Generally,
URL(fileURLWithPath:)
is used to solve such problems, but this API is not available in Mustache.swift because it supports iOS 9+. Therefore, encode the URL path to be added beforehand to work around the problem.