Open dbrgn opened 7 years ago
Hey guys, @triat!
I might have a fix for this. Could you take a look into referenced pull request?
Thanks!
I have the same problem with https://cdnjs.cloudflare.com/ajax/libs/Swiper/3.1.2/css/swiper.css
@vskh's PR solve the problem.
Hey guys, thanks @vskh for his PR, I just merged it, it should be there in the next version of django-pipeline.
This seems like an important fix. Preparing a 1.6.13 release.
Edit: I think we should add Django 1.11 support for the next release, which means dropping 1.6 and 1.7. Sounds like a 1.7.0 release, after a new PR.
I noticed that django-pipeline breaks the minified bootstrap 4 CSS file, even when using the no-op compressor. This affects at least 1.6.0, 1.6.10 and master.
I dug into the code and tried to fix it for about an hour, but that URL processing seems quite convoluted. Sorry :)
The problem is with CSS like this:
Because the URL detector regex looks like this:
...it does not ensure that both matched quotes are the same.
I tried to solve the issue with a backreference:
...but that seems to break some other tests.
Anyways, I couldn't come up with a fix, but here's a test case that should cover this issue:
Maybe it could help to quickly find a proper fix? I guess I just overlooked something in the codebase.
PS: How about using a proper CSS parser for this, that returns tokens with offsets?