Allow unsafe inline style on docs
authorMagnus Hagander <magnus@hagander.net>
Sat, 22 Dec 2018 15:28:42 +0000 (16:28 +0100)
committerMagnus Hagander <magnus@hagander.net>
Sat, 22 Dec 2018 15:28:42 +0000 (16:28 +0100)
Our new docs build seems to put this in there, and only older docs were
tested it seems.

pgweb/docs/views.py

index b99adf59c295f7cf6dd03746ca152caa653eac31..6cfb186092ebf7acd43b1a4f687074aedaf7e9e9 100644 (file)
@@ -1,7 +1,7 @@
 from django.shortcuts import render, get_object_or_404
 from django.http import HttpResponseRedirect, HttpResponsePermanentRedirect
 from django.http import Http404
-from pgweb.util.decorators import login_required, allow_frames
+from pgweb.util.decorators import login_required, allow_frames, content_sources
 from django.db.models import Q
 from django.conf import settings
 
@@ -18,6 +18,7 @@ from models import DocPage
 from forms import DocCommentForm
 
 @allow_frames
+@content_sources('style', "'unsafe-inline'")
 def docpage(request, version, filename):
        loaddate = None
        # Get the current version both to map the /current/ url, and to later