Escaping unmatched angle brackets function with tests.