Я заметил в django -csp карту сайта. Файл xml отображает стили и скрипты в браузерах chrome, но firefox отображает "Этот файл XML не имеет никакой информации о стиле, связанной с ним. Дерево документов показано ниже. " Есть ли способ программно в Django указать chrome не обрабатывать какие-либо стили или сценарии для файла карты сайта. xml или даже файла robots.txt?
CSS:
/* Copyright 2014 The Chromium Authors. All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
div.header {
border-bottom: 2px solid black;
padding-bottom: 5px;
margin: 10px;
}
div.collapsible > div.hidden {
display:none;
}
.pretty-print {
margin-top: 1em;
margin-left: 20px;
font-family: monospace;
font-size: 13px;
}
#webkit-xml-viewer-source-xml {
display: none;
}
.collapsible-content {
margin-left: 1em;
}
.comment {
white-space: pre;
}
.button {
-webkit-user-select: none;
cursor: pointer;
display: inline-block;
margin-left: -10px;
width: 10px;
background-repeat: no-repeat;
background-position: left top;
vertical-align: bottom;
}
.collapse-button {
background: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' fill='%23909090' width='10' height='10'><path d='M0 0 L8 0 L4 7 Z'/></svg>");
height: 10px;
}
.expand-button {
background: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' fill='%23909090' width='10' height='10'><path d='M0 0 L0 8 L7 4 Z'/></svg>");
height: 10px;
}
Javascript:
prepareWebKitXMLViewer@VM709:30(anonymous)@VM709:383
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"> ........
"use strict";
var nodeParentPairs = [];
var tree;
function prepareWebKitXMLViewer()
{
var html = createHTMLElement('html');
var head = createHTMLElement('head');
html.appendChild(head);
var style = createHTMLElement('style');
style.id = 'xml-viewer-style';
head.appendChild(style);
var body = createHTMLElement('body');
html.appendChild(body);
var sourceXML = createHTMLElement('div');
sourceXML.id = 'webkit-xml-viewer-source-xml';
body.appendChild(sourceXML);
var child;
while (child = document.firstChild) {
document.removeChild(child);
if (child.nodeType != Node.DOCUMENT_TYPE_NODE)
sourceXML.appendChild(child);
}
document.appendChild(html);
var header = createHTMLElement('div');
body.appendChild(header);
header.classList.add('header');
var headerSpan = createHTMLElement('span');
header.appendChild(headerSpan);
headerSpan.textContent = "This XML file does not appear to have any style information " +
"associated with it. The document tree is shown below.";
header.appendChild(createHTMLElement('br'));
tree = createHTMLElement('div');
body.appendChild(tree);
tree.classList.add('pretty-print');
window.onload = sourceXMLLoaded;
}