Closed DragonJoker closed 1 year ago
So, I did have percent encoding implemented in the URI
class, but was not calling the function in the URI::operator=(const URIView& view)
operator, which was used internally while parsing. I have now changed that operator to always try and decode and then parse the URI again. (I think) this should now cover all cases in the URI
class that it should always contain properly decoded URIs. I've also added a test case with that asset.
However, it should probably be noted somewhere that if someone should create a URIView
from a std::string_view
that contains percent-encoded chars, that will not be decoded by the view. Data coming directly from fastgltf should always be properly decoded, though.
Currently the glTF sample model "Box With Spaces" isn't parsed due to escaped spaces in URIs. This glTF file uses both URIs with spaces and URIs with escaped spaces (using %20).