#33765: ManifestStaticFilesStorage doesn't support trailing whitespace for JS
source map references
-------------------------------------+-------------------------------------
     Reporter:  Adam Johnson         |                    Owner:  nobody
         Type:  Bug                  |                   Status:  new
    Component:  contrib.staticfiles  |                  Version:  4.0
     Severity:  Normal               |               Resolution:
     Keywords:                       |             Triage Stage:
                                     |  Unreviewed
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Description changed by Adam Johnson:

Old description:

> #32383 added support for JS source map references, but the regex is
> incomplete. Browsers ignore trailing whitespace in source map references,
> but the regex we added did not allow for that. Whilst trailing whitespace
> is unlikely to be used, since source maps are normally generated by
> automated tools that shouldn't add it, we should ignore it to match
> browser behaviour.
>
> Spotted during discussion on [this PR
> https://github.com/django/django/pull/15475] for a similar fix on CSS
> source map references.
>
> (Also as discussed, I tested the inital space being a tab, or more than
> one space, and those options are not supported by Firefox.)

New description:

 #32383 added support for JS source map references, but the regex is
 incomplete. Browsers ignore trailing whitespace in source map references,
 but the regex we added did not allow for that. Whilst trailing whitespace
 is unlikely to be used, since source maps are normally generated by
 automated tools that shouldn't add it, we should ignore it to match
 browser behaviour.

 Spotted during discussion on [https://github.com/django/django/pull/15475
 this PR] for a similar fix on CSS source map references.

 (Also as discussed, I tested the inital space being a tab, or more than
 one space, and those options are not supported by Firefox.)

--

-- 
Ticket URL: <https://code.djangoproject.com/ticket/33765#comment:1>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/0107018129402fdb-d3f9b2de-659c-41d3-94c6-98f655771ab4-000000%40eu-central-1.amazonses.com.

Reply via email to