Skip to content
Snippets Groups Projects
Commit d728f17b authored by Igor Scheller's avatar Igor Scheller
Browse files

treewide: Replace xhtml content type with html, remove xhtml workaround

parent bbc00017
No related branches found
No related tags found
No related merge requests found
......@@ -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.
......
<!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" />
......
<%-
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" />
......
<!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" />
......
<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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment