fixed character escaping for angle brackets