Change classmethod _munge() into a staticmethod

The cls parameter is not used.
Change newlines into HTML linebreaks