move markup escaping of selection into the formatSelection callback. fixes #1417. fixes #1420