'Export to Html fails if cursor is right behind the text in EditText
I have an EditText into which I simply type one word: Test. I leave the cursor where it is (directly behind the word). Here is the screenshot:
Then I simply call Html.toHtml(...) on that EditText:
String text = Html.toHtml(mEditText.getText());
The result is:
<p dir="ltr"><u>Test</u></p>
Where do the tags <u>...</u> come from? It seems that the call toHtml interpretes the underlining of the cursor as a text formatting. I don't want to have the tags <u>...</u> in my exported html just because the cursor was at the end of the text. Does anyone know how to fix this?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|

