treewide: Replace xhtml content type with html, remove xhtml workaround
This commit is contained in:
parent
bbc00017a9
commit
d728f17b8f
@ -74,8 +74,7 @@ Useful functions:
|
||||
- *header* (*key*, *value*): Adds an HTTP header to the reply to be sent to
|
||||
the client. Has no effect when non-header data has already been written.
|
||||
- *prepare_content* (*mime*): Sets the *Content-Type* header to the given MIME
|
||||
type, potentially setting additional headers or modifying the MIME type to
|
||||
accommodate browser quirks
|
||||
type
|
||||
- *write* (*data*, ...): Sends the given data to the client. If headers have not
|
||||
been sent, it will be done before the data is written.
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
<!DOCTYPE html>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<html lang="">
|
||||
<head>
|
||||
<meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate" />
|
||||
<meta http-equiv="Pragma" content="no-cache" />
|
||||
|
@ -94,10 +94,10 @@ You may obtain a copy of the License at
|
||||
subtree({path}, root.nodes[category], ...)
|
||||
end
|
||||
|
||||
http:prepare_content("application/xhtml+xml")
|
||||
http:prepare_content("text/html")
|
||||
-%>
|
||||
<!DOCTYPE html>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" lang="" xml:lang="">
|
||||
<html lang="">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<link rel="stylesheet" type="text/css" media="screen" href="/static/gluon.css" />
|
||||
|
@ -1,8 +1,8 @@
|
||||
<%-
|
||||
http:prepare_content("application/xhtml+xml")
|
||||
http:prepare_content("text/html")
|
||||
-%>
|
||||
<!DOCTYPE html>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" lang="" xml:lang="">
|
||||
<html lang="">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, user-scalable=no" />
|
||||
|
@ -118,10 +118,10 @@
|
||||
)
|
||||
end
|
||||
|
||||
http:prepare_content("application/xhtml+xml")
|
||||
http:prepare_content("text/html")
|
||||
-%>
|
||||
<!DOCTYPE html>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" lang="" xml:lang="">
|
||||
<html lang="">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, user-scalable=no" />
|
||||
|
@ -1,5 +1,5 @@
|
||||
<!DOCTYPE html>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<html lang="">
|
||||
<head>
|
||||
<meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate" />
|
||||
<meta http-equiv="Pragma" content="no-cache" />
|
||||
|
@ -1,7 +1,6 @@
|
||||
<div id="<%=id%>" class="gluon-osm-map" style="display: none"></div>
|
||||
<script type="text/javascript" src="/static/gluon-web-osm.js"></script>
|
||||
<script type="text/javascript">
|
||||
//<![CDATA[
|
||||
(function() {
|
||||
var elMap = document.getElementById(<%=json(id)%>);
|
||||
var wrapper = elMap.parentNode;
|
||||
@ -42,5 +41,4 @@
|
||||
});
|
||||
});
|
||||
})();
|
||||
//]]>
|
||||
</script>
|
||||
|
@ -78,13 +78,6 @@ end
|
||||
function Http:prepare_content(mime)
|
||||
if self.headers["content-type"] then return end
|
||||
|
||||
if mime == "application/xhtml+xml" then
|
||||
local accept = self:getenv("HTTP_ACCEPT")
|
||||
if not accept or not accept:find("application/xhtml+xml", nil, true) then
|
||||
mime = "text/html; charset=UTF-8"
|
||||
end
|
||||
self:header("Vary", "Accept")
|
||||
end
|
||||
self:header("Content-Type", mime)
|
||||
end
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user