Factoids: Fix compatibility of web server with Python 3. Closes GH-784.