Fix rendering extension static media bundles when using only source files.

Review Request #10822 — Created Jan. 13, 2020 and submitted

Information

Djblets
release-2.0.x

Reviewers

When rendering an extension's static media files in debug mode, the
resulting HTML is returned as unsafe text. This can lead Django to
escape the contents, breaking pages and showing HTML source in the
pages.

This fixes this by explicitly marking the HTML as safe. The bulk of the
change, though, is to the unit tests. We now have two versions of most
of the tests: One with Pipeline enabled, one with Pipeline disabled.
This gives us full test coverage of this logic so that neither mode can
regress without tests failing in the future.

Unit tests pass on all supported versions of Django and Python.

Summary ID
Fix rendering extension static media bundles when using only source files.
When rendering an extension's static media files in debug mode, the resulting HTML is returned as unsafe text. This can lead Django to escape the contents, breaking pages and showing HTML source in the pages. This fixes this by explicitly marking the HTML as safe. The bulk of the change, though, is to the unit tests. We now have two versions of most of the tests: One with Pipeline enabled, one with Pipeline disabled. This gives us full test coverage of this logic so that neither mode can regress without tests failing in the future.
02c4a5644aaab79689c3ee17c7fe565df2443a10
david
  1. Ship It!
  2. 
      
chipx86
Review request changed

Status: Closed (submitted)

Change Summary:

Pushed to release-2.0.x (d53ad9a)
Loading...