- Remove author sorting; it's not obvious that this is being done anyways.
- Format author and contributors as separate sentences; conjunctions are messy for code and very language-specific.
This has limited value these days, because 1) the email info for authors is most often in a public VCS already 2) it makes using the actual contact info harder.
* utils.web: Import html escaping functions
Signed-off-by: Johannes Löthberg <johannes@kyriasis.com>
* Aka: Add web interface for browsing Akas
Fixes#1226.
Signed-off-by: Johannes Löthberg <johannes@kyriasis.com>
* httpserver: Actually handle KeyError in unhook
Signed-off-by: Johannes Löthberg <johannes@kyriasis.com>
* test: FakeHTTPConnection: Don't decode data in send
BaseHTTPRequestHandler expects to get bytes, so we can't decode the sent
data.
Signed-off-by: Johannes Löthberg <johannes@kyriasis.com>
* test: HTTPPluginTestCase: Use BytesIO instead of StringIO
BaseHTTPRequestHandler expects bytes, not strings.
Signed-off-by: Johannes Löthberg <johannes@kyriasis.com>
* test: HTTPPluginTestCase: Rewind wfile to 0 before reading the response
Otherwise the read pointer is at the end of the file.
Signed-off-by: Johannes Löthberg <johannes@kyriasis.com>
* Aka: Add basic web UI tests
Signed-off-by: Johannes Löthberg <johannes@kyriasis.com>
* use string.capwords() - not .title(). closes#1366
* add test case for "@format title" that checks handling apostrophes
* `assertResponse` evidently needs the relevant subcommand
Fixes#1350. This works around an edge case in charybdis / ircd-seven where remote
whois requests to a UID are not accepted if it is given in a different case.
Which means there may be a command/update thread running and returning after assertNoResponse returns.
In particular, that's an issue when assertNoResponse is called right before
setting feedparser._open_resource, because the running thread might still
be holding the lock but have fetched the new version already, so the
thread announces the new feed elements earlier than expected.
Otherwise, if it's provided and the network doesn't exist (or the bot isn't
currently connected to it), it's interpreted as being a quit message and
disconnects from the current network.
Hopefully this will ease debugging - e.g. a bad TLS certificate will now show
"Error: Couldn't get RSS feed. Parser error: <urlopen error
[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:720)>"
instead of only a generic message.