Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

default to lazy html5 style

  • Loading branch information...
commit 9e0172c27fb0bed8551b3ba27df5113c984743d6 1 parent b41d35f
Sebastian Riedel kraih authored
24 lib/Mojo/HelloWorld.pm
View
@@ -117,11 +117,11 @@ sub _diag {
<head><title>Mojo Diagnostics</title></head>
<body>
<a href="/diag/cookies">Cookies</a>
- <a href="/diag/chunked_params">Chunked Request Parameters</a><br />
- <a href="/diag/dump_env">Dump Environment Variables</a><br />
- <a href="/diag/dump_params">Dump Request Parameters</a><br />
- <a href="/diag/proxy">Proxy</a><br />
- <a href="/diag/upload">Upload</a><br />
+ <a href="/diag/chunked_params">Chunked Request Parameters</a><br>
+ <a href="/diag/dump_env">Dump Environment Variables</a><br>
+ <a href="/diag/dump_params">Dump Request Parameters</a><br>
+ <a href="/diag/proxy">Proxy</a><br>
+ <a href="/diag/upload">Upload</a><br>
<a href="/diag/websocket">WebSocket</a>
</body>
</html>
@@ -207,14 +207,14 @@ sub _proxy {
<body>
Sync:
<form action="$url" method="GET">
- <input type="text" name="url" value="http://"/>
- <input type="submit" value="Fetch" />
+ <input type="text" name="url" value="http://">
+ <input type="submit" value="Fetch">
</form>
- <br />
+ <br>
Async:
<form action="$url" method="GET">
- <input type="text" name="async_url" value="http://"/>
- <input type="submit" value="Fetch" />
+ <input type="text" name="async_url" value="http://">
+ <input type="submit" value="Fetch">
</form>
</body>
</html>
@@ -253,8 +253,8 @@ sub _upload {
<body>
File:
<form action="$url" method="POST" enctype="multipart/form-data">
- <input type="file" name="file" />
- <input type="submit" value="Upload" />
+ <input type="file" name="file">
+ <input type="submit" value="Upload">
</form>
</body>
</html>
6 lib/Mojolicious/Controller.pm
View
@@ -796,8 +796,8 @@ __DATA__
<!doctype html><html>
<head>
<title>Mojolicious Exception</title>
- <meta http-equiv="Pragma" content="no-cache" />
- <meta http-equiv="Expires" content="-1" />
+ <meta http-equiv="Pragma" content="no-cache">
+ <meta http-equiv="Expires" content="-1">
%= base_tag
%= javascript 'js/jquery.js'
%= stylesheet 'css/prettify.css'
@@ -1005,7 +1005,7 @@ __DATA__
</section>
<footer>
%= link_to 'http://mojolicio.us' => begin
- <img src="/mojolicious-black.png" alt="Mojolicious logo" />
+ <img src="/mojolicious-black.png" alt="Mojolicious logo">
% end
</footer>
%= javascript begin
14 lib/Mojolicious/Guides/Growing.pod
View
@@ -439,21 +439,21 @@ like this.
% layout 'default';
<%= form_for index => begin %>
<% if (param 'user') { %>
- <b>Wrong name or password, please try again.</b><br />
+ <b>Wrong name or password, please try again.</b><br>
<% } %>
- Name:<br />
- <%= text_field 'user' %><br />
- Password:<br />
- <%= password_field 'pass' %><br />
+ Name:<br>
+ <%= text_field 'user' %><br>
+ Password:<br>
+ <%= password_field 'pass' %><br>
<%= submit_button 'Login' %>
<% end %>
@@ protected.html.ep
% layout 'default';
<% if (my $message = flash 'message') { %>
- <b><%= $message %></b><br />
+ <b><%= $message %></b><br>
<% } %>
- Welcome <%= session 'user' %>!<br />
+ Welcome <%= session 'user' %>!<br>
<%= link_to Logout => 'logout' %>
More information about template helpers can be found in
6 lib/Mojolicious/Guides/Rendering.pod
View
@@ -458,7 +458,7 @@ stylesheets.
$self->write_chunk('<html><head><title>Example</title>');
$self->write_chunk('<link href="example.css" rel="stylesheet"');
- $self->write_chunk(' type="text/css" /></head>', sub {
+ $self->write_chunk(' type="text/css"></head>', sub {
my $self = shift;
$self->write_chunk('<body>Example</body></html>');
$self->write_chunk('');
@@ -472,8 +472,8 @@ An empty chunk marks the end of the stream.
<html><head><title>Example</title>
29
<link href="example.css" rel="stylesheet"
- 19
- type="text/css" /></head>
+ 17
+ type="text/css"></head>
1C
<body>Example</body></html>
0
14 lib/Mojolicious/Lite.pm
View
@@ -534,21 +534,21 @@ request), this is very useful in combination with C<redirect_to>.
% layout 'default';
<%= form_for login => begin %>
<% if (param 'name') { %>
- <b>Wrong name or password, please try again.</b><br />
+ <b>Wrong name or password, please try again.</b><br>
<% } %>
- Name:<br />
- <%= text_field 'name' %><br />
- Password:<br />
- <%= password_field 'pass' %><br />
+ Name:<br>
+ <%= text_field 'name' %><br>
+ Password:<br>
+ <%= password_field 'pass' %><br>
<%= submit_button 'Login' %>
<% end %>
@@ index.html.ep
% layout 'default';
<% if (my $message = flash 'message' ) { %>
- <b><%= $message %></b><br />
+ <b><%= $message %></b><br>
<% } %>
- Welcome <%= session 'name' %>!<br />
+ Welcome <%= session 'name' %>!<br>
<%= link_to logout => begin %>
Logout
<% end %>
64 lib/Mojolicious/Plugin/TagHelpers.pm
View
@@ -313,7 +313,7 @@ sub _tag {
}
# Empty element
- else { $tag .= ' />' }
+ else { $tag .= '>' }
# Prevent escaping
return b($tag);
@@ -352,7 +352,7 @@ Note that this module is EXPERIMENTAL and might change without warning!
Generate C<base> tag refering to the current base URL.
- <base href="http://localhost/cgi-bin/myapp.pl" />
+ <base href="http://localhost/cgi-bin/myapp.pl">
=item check_box
@@ -361,8 +361,8 @@ Generate C<base> tag refering to the current base URL.
Generate checkbox input element.
- <input name="employed" type="checkbox" value="1" />
- <input id="foo" name="employed" type="checkbox" value="1" />
+ <input name="employed" type="checkbox" value="1">
+ <input id="foo" name="employed" type="checkbox" value="1">
=item file_field
@@ -371,8 +371,8 @@ Generate checkbox input element.
Generate file input element.
- <input name="avatar" type="file" />
- <input id="foo" name="avatar" type="file" />
+ <input name="avatar" type="file">
+ <input id="foo" name="avatar" type="file">
=item form_for
@@ -396,20 +396,20 @@ Generate file input element.
Generate form for route, path or URL.
<form action="/path/to/login" method="post">
- <input name="first_name" />
- <input value="Ok" type="submit" />
+ <input name="first_name">
+ <input value="Ok" type="submit">
</form>
<form action="/path/to/login/bar" method="post">
- <input name="first_name" />
- <input value="Ok" type="submit" />
+ <input name="first_name">
+ <input value="Ok" type="submit">
</form>
<form action="/login" method="post">
- <input name="first_name" />
- <input value="Ok" type="submit" />
+ <input name="first_name">
+ <input value="Ok" type="submit">
</form>
<form action="http://kraih.com/login" method="post">
- <input name="first_name" />
- <input value="Ok" type="submit" />
+ <input name="first_name">
+ <input value="Ok" type="submit">
</form>
=item hidden_field
@@ -419,8 +419,8 @@ Generate form for route, path or URL.
Generate hidden input element.
- <input name="foo" type="hidden" value="bar" />
- <input id="bar" name="foo" type="hidden" value="bar" />
+ <input name="foo" type="hidden" value="bar">
+ <input id="bar" name="foo" type="hidden" value="bar">
=item input_tag
@@ -431,10 +431,10 @@ Generate hidden input element.
Generate form input element.
- <input name="first_name" />
- <input name="first_name" value="Default name" />
- <input name="employed" type="checkbox" />
- <input name="country" type="radio" value="germany" />
+ <input name="first_name">
+ <input name="first_name" value="Default name">
+ <input name="employed" type="checkbox">
+ <input name="country" type="radio" value="germany">
=item javascript
@@ -445,7 +445,7 @@ Generate form input element.
Generate script tag for C<Javascript> asset.
- <script src="script.js" type="text/javascript" />
+ <script src="script.js" type="text/javascript">
<script type="text/javascript"><![CDATA[
var a = 'b';
]]></script>
@@ -478,8 +478,8 @@ will be used as content.
Generate password input element.
- <input name="pass" type="password" />
- <input id="foo" name="pass" type="password" />
+ <input name="pass" type="password">
+ <input id="foo" name="pass" type="password">
=item radio_button
@@ -488,8 +488,8 @@ Generate password input element.
Generate radio input element.
- <input name="country" type="radio" value="germany" />
- <input id="foo" name="country" type="radio" value="germany" />
+ <input name="country" type="radio" value="germany">
+ <input id="foo" name="country" type="radio" value="germany">
=item select_field
@@ -528,7 +528,7 @@ Generate select, option and optgroup elements.
Generate style or link tag for C<CSS> asset.
- <link href="foo.css" media="screen" rel="stylesheet" type="text/css" />
+ <link href="foo.css" media="screen" rel="stylesheet" type="text/css">
<style type="text/css"><![CDATA[
body {color: #000}
]]></style>
@@ -540,8 +540,8 @@ Generate style or link tag for C<CSS> asset.
Generate submit input element.
- <input type="submit" value="Ok" />
- <input id="foo" type="submit" value="Ok!" />
+ <input type="submit" value="Ok">
+ <input id="foo" type="submit" value="Ok!">
=item tag
@@ -551,8 +551,8 @@ Generate submit input element.
HTML5 tag generator.
- <div />
- <div id="foo" />
+ <div>
+ <div id="foo">
<div>Content</div>
=item text_field
@@ -562,8 +562,8 @@ HTML5 tag generator.
Generate text input element.
- <input name="first_name" />
- <input name="first_name" value="Default name" />
+ <input name="first_name">
+ <input name="first_name" value="Default name">
=item text_area
98 t/mojolicious/lite_app.t
View
@@ -792,8 +792,8 @@ $ENV{MOJO_REVERSE_PROXY} = $backup;
# GET /tags
$t->get_ok('/tags/lala?a=b&b=0&c=2&d=3&escaped=1%22+%222')->status_is(200)
->content_is(<<EOF);
-<foo />
-<foo bar="baz" />
+<foo>
+<foo bar="baz">
<foo one="two" three="four">Hello</foo>
<a href="/path">Path</a>
<a href="http://example.com/" title="Foo">Foo</a>
@@ -801,31 +801,31 @@ $t->get_ok('/tags/lala?a=b&b=0&c=2&d=3&escaped=1%22+%222')->status_is(200)
<a href="/template">Home</a>
<a href="/tags/23" title="Foo">Foo</a>
<form action="/template" method="post">
- <input name="foo" />
+ <input name="foo">
</form>
<form action="/tags/24" method="post">
- <input name="foo" />
- <input name="foo" type="checkbox" value="1" />
- <input checked="checked" name="a" type="checkbox" value="2" />
- <input name="b" type="radio" value="1" />
- <input checked="checked" name="b" type="radio" value="0" />
- <input name="c" type="hidden" value="foo" />
- <input name="d" type="file" />
+ <input name="foo">
+ <input name="foo" type="checkbox" value="1">
+ <input checked="checked" name="a" type="checkbox" value="2">
+ <input name="b" type="radio" value="1">
+ <input checked="checked" name="b" type="radio" value="0">
+ <input name="c" type="hidden" value="foo">
+ <input name="d" type="file">
<textarea cols="40" name="e" rows="50">
default!
</textarea>
<textarea name="f"></textarea>
- <input name="g" type="password" />
- <input id="foo" name="h" type="password" />
- <input type="submit" value="Ok!" />
- <input id="bar" type="submit" value="Ok too!" />
+ <input name="g" type="password">
+ <input id="foo" name="h" type="password">
+ <input type="submit" value="Ok!">
+ <input id="bar" type="submit" value="Ok too!">
</form>
<form action="/">
- <input name="foo" />
+ <input name="foo">
</form>
-<input name="escaped" value="1&quot; &quot;2" />
-<input name="a" value="b" />
-<input name="a" value="b" />
+<input name="escaped" value="1&quot; &quot;2">
+<input name="a" value="b">
+<input name="a" value="b">
<script src="script.js" type="text/javascript"></script>
<script type="text/javascript">//<![CDATA[
@@ -837,7 +837,7 @@ $t->get_ok('/tags/lala?a=b&b=0&c=2&d=3&escaped=1%22+%222')->status_is(200)
var a = 'b';
//]]></script>
-<link href="foo.css" media="screen" rel="stylesheet" type="text/css" />
+<link href="foo.css" media="screen" rel="stylesheet" type="text/css">
<style type="text/css">/*<![CDATA[*/
body {color: #000}
@@ -852,8 +852,8 @@ EOF
# GET /tags (alternative)
$t->get_ok('/tags/lala?c=b&d=3&e=4&f=5')->status_is(200)->content_is(<<EOF);
-<foo />
-<foo bar="baz" />
+<foo>
+<foo bar="baz">
<foo one="two" three="four">Hello</foo>
<a href="/path">Path</a>
<a href="http://example.com/" title="Foo">Foo</a>
@@ -861,29 +861,29 @@ $t->get_ok('/tags/lala?c=b&d=3&e=4&f=5')->status_is(200)->content_is(<<EOF);
<a href="/template">Home</a>
<a href="/tags/23" title="Foo">Foo</a>
<form action="/template" method="post">
- <input name="foo" />
+ <input name="foo">
</form>
<form action="/tags/24" method="post">
- <input name="foo" />
- <input name="foo" type="checkbox" value="1" />
- <input name="a" type="checkbox" value="2" />
- <input name="b" type="radio" value="1" />
- <input name="b" type="radio" value="0" />
- <input name="c" type="hidden" value="foo" />
- <input name="d" type="file" />
+ <input name="foo">
+ <input name="foo" type="checkbox" value="1">
+ <input name="a" type="checkbox" value="2">
+ <input name="b" type="radio" value="1">
+ <input name="b" type="radio" value="0">
+ <input name="c" type="hidden" value="foo">
+ <input name="d" type="file">
<textarea cols="40" name="e" rows="50">4</textarea>
<textarea name="f">5</textarea>
- <input name="g" type="password" />
- <input id="foo" name="h" type="password" />
- <input type="submit" value="Ok!" />
- <input id="bar" type="submit" value="Ok too!" />
+ <input name="g" type="password">
+ <input id="foo" name="h" type="password">
+ <input type="submit" value="Ok!">
+ <input id="bar" type="submit" value="Ok too!">
</form>
<form action="/">
- <input name="foo" />
+ <input name="foo">
</form>
-<input name="escaped" />
-<input name="a" />
-<input name="a" value="c" />
+<input name="escaped">
+<input name="a">
+<input name="a" value="c">
<script src="script.js" type="text/javascript"></script>
<script type="text/javascript">//<![CDATA[
@@ -895,7 +895,7 @@ $t->get_ok('/tags/lala?c=b&d=3&e=4&f=5')->status_is(200)->content_is(<<EOF);
var a = 'b';
//]]></script>
-<link href="foo.css" media="screen" rel="stylesheet" type="text/css" />
+<link href="foo.css" media="screen" rel="stylesheet" type="text/css">
<style type="text/css">/*<![CDATA[*/
body {color: #000}
@@ -926,7 +926,7 @@ $t->put_ok('/selection')->status_is(200)
. '<option value="baz">baz</option>'
. '</select>'
. "\n "
- . '<input type="submit" value="Ok" />' . "\n"
+ . '<input type="submit" value="Ok">' . "\n"
. '</form>'
. "\n");
@@ -948,7 +948,7 @@ $t->put_ok('/selection?a=e&foo=bar')->status_is(200)
. '<option value="baz">baz</option>'
. '</select>'
. "\n "
- . '<input type="submit" value="Ok" />' . "\n"
+ . '<input type="submit" value="Ok">' . "\n"
. '</form>'
. "\n");
@@ -970,7 +970,7 @@ $t->put_ok('/selection?foo=bar&a=e&foo=baz')->status_is(200)
. '<option selected="selected" value="baz">baz</option>'
. '</select>'
. "\n "
- . '<input type="submit" value="Ok" />' . "\n"
+ . '<input type="submit" value="Ok">' . "\n"
. '</form>'
. "\n");
@@ -1059,26 +1059,26 @@ $t->get_ok('/plugin_with_template')->status_is(200)
$t->get_ok('/nested-includes')->status_is(200)
->header_is(Server => 'Mojolicious (Perl)')
->header_is('X-Powered-By' => 'Mojolicious (Perl)')
- ->content_is("layouted Nested Hello\n[\n 1,\n 2\n]\nthere<br/>!\n\n\n\n");
+ ->content_is("layouted Nested Hello\n[\n 1,\n 2\n]\nthere<br>!\n\n\n\n");
# GET /outerlayout
$t->get_ok('/outerlayout')->status_is(200)
->header_is(Server => 'Mojolicious (Perl)')
->header_is('X-Powered-By' => 'Mojolicious (Perl)')
- ->content_is("layouted Hello\n[\n 1,\n 2\n]\nthere<br/>!\n\n\n");
+ ->content_is("layouted Hello\n[\n 1,\n 2\n]\nthere<br>!\n\n\n");
# GET /outerlayouttwo
$t->get_ok('/outerlayouttwo')->status_is(200)
->header_is(Server => 'Mojolicious (Perl)')
->header_is('X-Powered-By' => 'Mojolicious (Perl)')
- ->content_is("layouted Hello\n[\n 1,\n 2\n]\nthere<br/>!\n\n\n");
+ ->content_is("layouted Hello\n[\n 1,\n 2\n]\nthere<br>!\n\n\n");
# GET /outerinnerlayout
$t->get_ok('/outerinnerlayout')->status_is(200)
->header_is(Server => 'Mojolicious (Perl)')
->header_is('X-Powered-By' => 'Mojolicious (Perl)')
->content_is(
- "layouted Hello\nlayouted [\n 1,\n 2\n]\nthere<br/>!\n\n\n\n");
+ "layouted Hello\nlayouted [\n 1,\n 2\n]\nthere<br>!\n\n\n\n");
# GET /withblocklayout
$t->get_ok('/withblocklayout')->status_is(200)
@@ -1281,13 +1281,13 @@ $t->get_ok('/app')->status_is(200)->header_is(Server => 'Mojolicious (Perl)')
$t->get_ok('/helper')->status_is(200)
->header_is(Server => 'Mojolicious (Perl)')
->header_is('X-Powered-By' => 'Mojolicious (Perl)')
- ->content_is("23\n<br/>\n&lt;...\n/template\n(Mojolicious (Perl))");
+ ->content_is("23\n<br>\n&lt;...\n/template\n(Mojolicious (Perl))");
# GET /helper
$t->get_ok('/helper', {'User-Agent' => 'Explorer'})->status_is(200)
->header_is(Server => 'Mojolicious (Perl)')
->header_is('X-Powered-By' => 'Mojolicious (Perl)')
- ->content_is("23\n<br/>\n&lt;...\n/template\n(Explorer)");
+ ->content_is("23\n<br>\n&lt;...\n/template\n(Explorer)");
# GET /eperror
$t->get_ok('/eperror')->status_is(500)
@@ -1736,7 +1736,7 @@ Hello
@@ outermenu.html.ep
% stash test => 'there';
-<%= dumper [1, 2] %><%= stash 'test' %><br/>!
+<%= dumper [1, 2] %><%= stash 'test' %><br>!
@@ outerinnerlayout.html.ep
Hello
@@ -1781,7 +1781,7 @@ app layout <%= content %><%= app->mode %>
@@ helper.html.ep
%= $default
-%== '<br/>'
+%== '<br>'
%= '<...'
%= url_for 'index'
(<%= agent %>)\
Please sign in to comment.
Something went wrong with that request. Please try again.