aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack
diff options
context:
space:
mode:
authorSam Ruby <rubys@intertwingly.net>2013-01-02 16:06:54 -0500
committerSam Ruby <rubys@intertwingly.net>2013-01-02 16:06:54 -0500
commit73f4f4aa8fc33fdd72e98f397b876a5a5e6528cf (patch)
treefa194badd62975e72a9ac54c0bdb306b9199c169 /actionpack
parent8890fb80878ed4d814c5cd4a73f3c1d8694680da (diff)
downloadrails-73f4f4aa8fc33fdd72e98f397b876a5a5e6528cf.tar.gz
rails-73f4f4aa8fc33fdd72e98f397b876a5a5e6528cf.tar.bz2
rails-73f4f4aa8fc33fdd72e98f397b876a5a5e6528cf.zip
Fix a number of validation/style errors:
* <pre> is not allowed to be nested inside of <p> elements in HTML * Indentation of </p> doesn't match corresponding <p> * <p> element not explicitly closed * One more </div> than <div> In each case, the template was fixed to match how a HTML5 parser would "see" the resulting page.
Diffstat (limited to 'actionpack')
-rw-r--r--actionpack/lib/action_dispatch/middleware/templates/rescues/_request_and_response.erb8
-rw-r--r--actionpack/lib/action_dispatch/middleware/templates/rescues/template_error.erb7
2 files changed, 7 insertions, 8 deletions
diff --git a/actionpack/lib/action_dispatch/middleware/templates/rescues/_request_and_response.erb b/actionpack/lib/action_dispatch/middleware/templates/rescues/_request_and_response.erb
index d117dc4235..10de228f1d 100644
--- a/actionpack/lib/action_dispatch/middleware/templates/rescues/_request_and_response.erb
+++ b/actionpack/lib/action_dispatch/middleware/templates/rescues/_request_and_response.erb
@@ -18,17 +18,17 @@
%>
<h2 style="margin-top: 30px">Request</h2>
-<p><b>Parameters</b>: <pre><%=h request_dump %></pre></p>
+<p><b>Parameters</b>:<p> <pre><%=h request_dump %></pre>
<div class="details">
<div class="summary"><a href="#" onclick="s = document.getElementById('session_dump').style; s.display = s.display == 'none' ? 'block' : 'none'; return false;">Toggle session dump</a></div>
- <div id="session_dump" style="display:none"><p><pre><%= debug_hash @request.session %></pre></p></div>
+ <div id="session_dump" style="display:none"><pre><%= debug_hash @request.session %></pre></div>
</div>
<div class="details">
<div class="summary"><a href="#" onclick="s = document.getElementById('env_dump').style; s.display=='block' ? s.display = s.display == 'none' ? 'block' : 'none'; return false;">Toggle env dump</a></div>
- <div id="env_dump" style="display:none"><p><pre><%= debug_hash @request.env.slice(*@request.class::ENV_METHODS) %></pre></p></div>
+ <div id="env_dump" style="display:none"><pre><%= debug_hash @request.env.slice(*@request.class::ENV_METHODS) %></pre></div>
</div>
<h2 style="margin-top: 30px">Response</h2>
-<p><b>Headers</b>: <pre><%=h defined?(@response) ? @response.headers.inspect.gsub(',', ",\n") : 'None' %></pre></p>
+<p><b>Headers</b>:</p> <pre><%=h defined?(@response) ? @response.headers.inspect.gsub(',', ",\n") : 'None' %></pre>
diff --git a/actionpack/lib/action_dispatch/middleware/templates/rescues/template_error.erb b/actionpack/lib/action_dispatch/middleware/templates/rescues/template_error.erb
index 01faf5a475..9f3816bf40 100644
--- a/actionpack/lib/action_dispatch/middleware/templates/rescues/template_error.erb
+++ b/actionpack/lib/action_dispatch/middleware/templates/rescues/template_error.erb
@@ -9,12 +9,12 @@
<div id="container">
<p>
Showing <i><%=h @exception.file_name %></i> where line <b>#<%=h @exception.line_number %></b> raised:
- <pre><code><%=h @exception.message %></code></pre>
- </p>
+ </p>
+ <pre><code><%=h @exception.message %></code></pre>
<div class="source">
<div class="info">
- <p>Extracted source (around line <strong>#<%=h @exception.line_number %></strong>):
+ <p>Extracted source (around line <strong>#<%=h @exception.line_number %></strong>):</p>
</div>
<div class="data">
<table cellpadding="0" cellspacing="0" class="lines">
@@ -40,5 +40,4 @@
<%= render template: "rescues/_trace" %>
<%= render template: "rescues/_request_and_response" %>
- </div>
</div>