[TextEditor] Handled possible out of bounds crash in url semantic
rule.