Fixed the Content-negotiation for sending XHTML.
Fixed a non-well-formed page. Maruku's metadata processing seems to be busted. May have to revert.
This commit is contained in:
parent
9cf0b504f1
commit
eeef7952c3
|
@ -148,7 +148,7 @@ class ApplicationController < ActionController::Base
|
|||
@response.headers['Content-Type'] = 'text/xml; charset=UTF-8'
|
||||
elsif %w(tex).include?(action_name)
|
||||
@response.headers['Content-Type'] = 'text/plain; charset=UTF-8'
|
||||
elsif Mime::Type.parse(@request.env["HTTP_ACCEPT"]).include?(Mime::XHTML) or @request.env["USER_AGENT"] =~ /MathPlayer/
|
||||
elsif @request.env['HTTP_USER_AGENT'] =~ /MathPlayer|Validator/ or Mime::Type.parse(@request.env["HTTP_ACCEPT"]).include?(Mime::XHTML)
|
||||
@response.headers['Content-Type'] = 'application/xhtml+xml; charset=UTF-8'
|
||||
else
|
||||
@response.headers['Content-Type'] = 'text/html; charset=UTF-8'
|
||||
|
@ -202,6 +202,7 @@ module Mime
|
|||
# Add XHTML
|
||||
XHTML = Type.new "application/xhtml+xml", :xhtml
|
||||
|
||||
# Fix xhtml lookup
|
||||
# Fix xhtml and html lookups
|
||||
LOOKUP["text/html"] = HTML
|
||||
LOOKUP["application/xhtml+xml"] = XHTML
|
||||
end
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
<% @title = "Wiki webs" %>
|
||||
<br/>
|
||||
|
||||
<ul>
|
||||
<% @webs.each do |web| %>
|
||||
|
||||
<li>
|
||||
<% if web.password %> <div class="web_protected">
|
||||
<% else %> <div class="web_normal"> <% end %>
|
||||
<span>
|
||||
<%= link_to_page 'HomePage', web, web.name, :mode => 'show' %>
|
||||
<% if web.published? %>
|
||||
(<%= link_to_page 'HomePage', web, 'published version', :mode => 'publish' %>)
|
||||
|
@ -19,7 +19,7 @@
|
|||
<%= web.last_page.revisions? ? "Revised" : "Created" %> by <%= author_link(web.last_page) %> (<%= web.last_page.current_revision.ip %>)
|
||||
<% end %>
|
||||
</div>
|
||||
</span>
|
||||
</div><br>
|
||||
</div>
|
||||
</li>
|
||||
<% end %>
|
||||
</ul>
|
||||
|
|
Loading…
Reference in a new issue