cleaned up 'escapehtml', added documentation