Fixes #1696: fixed incorrect display of "<" and ">" characters (ported from next to master branch)