fix an issue when the selected text of a text annotation included a parenthesis; add related test
merge tentative