Remove the unnecessary / from ends of self-closing html elements
This commit is contained in:
parent
baf9ec5387
commit
53a0ef3daf
1 changed files with 3 additions and 3 deletions
6
neomi.py
6
neomi.py
|
@ -28,7 +28,7 @@ default_config.no_itemtype_whitelist = {'robots.txt', 'favicon.ico'}
|
||||||
default_config.hurl_redirect_page = """<!DOCTYPE html>
|
default_config.hurl_redirect_page = """<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<meta http-equiv="refresh" content="2; url=__raw_url__"/>
|
<meta http-equiv="refresh" content="2; url=__raw_url__">
|
||||||
<title>Redirecting to __escaped_url__</title>
|
<title>Redirecting to __escaped_url__</title>
|
||||||
<style>body { max-width: 70ch; margin: auto; }</style>
|
<style>body { max-width: 70ch; margin: auto; }</style>
|
||||||
<head>
|
<head>
|
||||||
|
@ -622,7 +622,7 @@ def send_gophermap(sock, reader, protocol, *, config):
|
||||||
|
|
||||||
if itemtype == b'i':
|
if itemtype == b'i':
|
||||||
# Text
|
# Text
|
||||||
sock.sendall(html_encode(name) + b'<br/>\n')
|
sock.sendall(html_encode(name) + b'<br>\n')
|
||||||
|
|
||||||
else:
|
else:
|
||||||
# Link
|
# Link
|
||||||
|
@ -635,7 +635,7 @@ def send_gophermap(sock, reader, protocol, *, config):
|
||||||
else:
|
else:
|
||||||
url = b'http://' + server + b':' + port + b'/' + itemtype + urllib.parse.quote_from_bytes(path).encode('utf-8')
|
url = b'http://' + server + b':' + port + b'/' + itemtype + urllib.parse.quote_from_bytes(path).encode('utf-8')
|
||||||
|
|
||||||
sock.sendall(b'<a href="' + url + b'">' + html_encode(name) + b'</a><br/>\n')
|
sock.sendall(b'<a href="' + url + b'">' + html_encode(name) + b'</a><br>\n')
|
||||||
|
|
||||||
# Send footer of the HTML file
|
# Send footer of the HTML file
|
||||||
sock.sendall(b'</p></body></html>')
|
sock.sendall(b'</p></body></html>')
|
||||||
|
|
Loading…
Reference in a new issue