Skip to content

Commit f81de6d

Browse files
Explicitly set UTF-8 encoding for HTML in examples (Fixes miguelgrinberg#132)
1 parent efec9f1 commit f81de6d

File tree

16 files changed

+17
-1
lines changed

16 files changed

+17
-1
lines changed

examples/gpio/gpio.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
<html>
33
<head>
44
<title>Microdot GPIO Example</title>
5+
<meta charset="UTF-8">
56
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
67
<script>
78
function getCookie(name) {

examples/hello/hello.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
<html>
77
<head>
88
<title>Microdot Example Page</title>
9+
<meta charset="UTF-8">
910
</head>
1011
<body>
1112
<div>

examples/hello/hello_asgi.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
<html>
77
<head>
88
<title>Microdot Example Page</title>
9+
<meta charset="UTF-8">
910
</head>
1011
<body>
1112
<div>

examples/hello/hello_async.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
<html>
77
<head>
88
<title>Microdot Example Page</title>
9+
<meta charset="UTF-8">
910
</head>
1011
<body>
1112
<div>

examples/hello/hello_wsgi.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
<html>
77
<head>
88
<title>Microdot Example Page</title>
9+
<meta charset="UTF-8">
910
</head>
1011
<body>
1112
<div>

examples/sessions/login.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
<html>
77
<head>
88
<title>Microdot login example</title>
9+
<meta charset="UTF-8">
910
</head>
1011
<body>
1112
<h1>Microdot login example</h1>
@@ -17,7 +18,7 @@
1718
<form method="POST">
1819
<p>
1920
Username:
20-
<input type="text" name="username" autofocus />
21+
<input name="username" autofocus />
2122
</p>
2223
<input type="submit" value="Submit" />
2324
</form>'''

examples/static/static/index.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
<html>
33
<head>
44
<title>Static File Serving Demo</title>
5+
<meta charset="UTF-8">
56
</head>
67
<body>
78
<h1>Static File Serving Demo</h1>

examples/streaming/video_stream.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ def index(request):
1919
<html>
2020
<head>
2121
<title>Microdot Video Streaming</title>
22+
<meta charset="UTF-8">
2223
</head>
2324
<body>
2425
<h1>Microdot Video Streaming</h1>

examples/streaming/video_stream_async.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ def index(request):
2121
<html>
2222
<head>
2323
<title>Microdot Video Streaming</title>
24+
<meta charset="UTF-8">
2425
</head>
2526
<body>
2627
<h1>Microdot Video Streaming</h1>

examples/templates/jinja/templates/index.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
<html>
33
<head>
44
<title>Microdot + Jinja example</title>
5+
<meta charset="UTF-8">
56
</head>
67
<body>
78
<h1>Microdot + Jinja example</h1>

examples/templates/utemplate/templates/index.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
<html>
44
<head>
55
<title>Microdot + uTemplate example</title>
6+
<meta charset="UTF-8">
67
</head>
78
<body>
89
<h1>Microdot + uTemplate example</h1>

examples/tls/hello_async_tls.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
<html>
88
<head>
99
<title>Microdot Example Page</title>
10+
<meta charset="UTF-8">
1011
</head>
1112
<body>
1213
<div>

examples/tls/hello_tls.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
<html>
99
<head>
1010
<title>Microdot Example Page</title>
11+
<meta charset="UTF-8">
1112
</head>
1213
<body>
1314
<div>

examples/tls/index.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
<html>
33
<head>
44
<title>Microdot TLS WebSocket Demo</title>
5+
<meta charset="UTF-8">
56
</head>
67
<body>
78
<h1>Microdot TLS WebSocket Demo</h1>

examples/uploads/index.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
<html>
33
<head>
44
<title>Microdot Upload Example</title>
5+
<meta charset="UTF-8">
56
</head>
67
<body>
78
<h1>Microdot Upload Example</h1>

examples/websocket/index.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
<html>
33
<head>
44
<title>Microdot WebSocket Demo</title>
5+
<meta charset="UTF-8">
56
</head>
67
<body>
78
<h1>Microdot WebSocket Demo</h1>

0 commit comments

Comments
 (0)