pagekite/Mailpile — pull request #178 by ulikoehler (2013-09-14 15:21:25+00:00)
Title: Improve util.py

This adds some more docs to util.py and enable the doctests when calling *python util.py*.

Some bugs that were fixed:
* *escape_html* had limited functionality. Now using *cgi* module from python core to get better results
* The *obfuscate* parameter was used inconsistently, the doctest had a function, but in fact it's rather a salt. Maybe it should be renamed.
* The doctests were never called, plus they had invalid indentation after *>>>*, the *from mailpile import util* caused errors and the *\n* wasn't escaped.
* The size parameter in *thumbnail()* was never used after being converted to *x* string