Properly escape html entities in debug
Fixes #276