only strip comments at beginning of line

Any display text after a '#' character was getting treated as a comment e.g. case details headers

http://manage.dimagi.com/default.asp?85307