CachedStaticFilesStorage chokes on file references that end with a '#' or '?' character
|Reported by:||mkai||Owned by:||nobody|
|Severity:||Normal||Keywords:||CachedStaticFilesStorage, CachedFilesMixin, collectstatic|
|Cc:||Jannis Leidel||Triage Stage:||Accepted|
|Has patch:||no||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
I'm using the "bullet proof" font-face syntax as described here: http://www.fontspring.com/blog/the-new-bulletproof-font-face-syntax
It uses two special file references:
-- for IE support
url('myfont-webfont.svg#svgFontName') format('svg') -- for SVG fonts
During post_process, CachedStaticFilesStorage tries to open these files from disk, including the '?' and/ or '#' characters, which of course fails, and the processing stops.
The desired behavior would be that when trying to open the file from disk during collectstatic, the remainder following a question mark or hash character is stripped ("myfont-webfont.eot"), but that it still gets included into the hashed file ("myfont-webfont.<MD5>.eot?#iefix").