Fix bug #6 (altered check 'x in [None]' to 'x is None') and add html escaping for line output.