Repository: thunderbird/thunderbird-android (language: kotlin)

Issue:
sms: link not working
### Checklist

- [x] I have used the search function to see if someone else has already submitted the same bug report.
- [X] I will describe the problem with as much detail as possible.

### App version

6.000

### Where did you get the app from?

Google Play

### Android version

7.1.1

### Device model

E5823

### Steps to reproduce

1. Go to a mail with a "sms:" link
2. Click on them
3. Nothing appears

NOTE :

I've tested this on 2 different **android** smartphones. Both have this problem.

### Expected behavior

In others (mobile) mail clients, this link is opening the SMS interface to send a specific SMS to someone.

### Actual behavior

Nothing. The click action have any effect.

### Logs

_No response_


Discussion hints:
I confirm.
It seams to be a "parsing issue", links built with a sms: URI are not recognized "as links" so they are not clickable.
Tested forms : 

<a href="sms:+0102030405&body=Hello" ...
<a href="sms:?body=Hello" ...
<a href="sms:&body=Hello" ...
<a href="sms:?&body=Hello" ...
<a href="sms:/?&body=Hello" ...

Pull request: Allow all URI schemes in links
Fixes #6103

Test command: ./gradlew :app:html-cleaner:test --tests "app.k9mail.html.cleaner.HtmlSanitizerTest"

Fix patch:
diff --git a/app/html-cleaner/src/main/java/app/k9mail/html/cleaner/BodyCleaner.kt b/app/html-cleaner/src/main/java/app/k9mail/html/cleaner/BodyCleaner.kt
index 327d7f80613..80fa043e840 100644
--- a/app/html-cleaner/src/main/java/app/k9mail/html/cleaner/BodyCleaner.kt
+++ b/app/html-cleaner/src/main/java/app/k9mail/html/cleaner/BodyCleaner.kt
@@ -36,7 +36,9 @@ internal class BodyCleaner {
             .addAttributes("img", "usemap")
             .addAttributes(":all", "class", "style", "id", "dir")
             .addProtocols("img", "src", "http", "https", "cid", "data")
-            .addProtocols("a", "href", "tel", "sip", "bitcoin", "ethereum", "rtsp")
+
+            // Allow all URI schemes in links
+            .removeProtocols("a", "href", "ftp", "http", "https", "mailto")
 
         cleaner = Cleaner(allowList)
     }


Test patch:
diff --git a/app/html-cleaner/src/test/java/app/k9mail/html/cleaner/HtmlSanitizerTest.kt b/app/html-cleaner/src/test/java/app/k9mail/html/cleaner/HtmlSanitizerTest.kt
index 9ebc3857b5e..12ea9e797b9 100644
--- a/app/html-cleaner/src/test/java/app/k9mail/html/cleaner/HtmlSanitizerTest.kt
+++ b/app/html-cleaner/src/test/java/app/k9mail/html/cleaner/HtmlSanitizerTest.kt
@@ -301,6 +301,8 @@ class HtmlSanitizerTest {
         )
     }
 
+    // This test will fail when jsoup updates its list of allowed "protocols" for the a.href attribute.
+    // When that happens, please adjust the removeProtocols("a", "href", …) line in BodyCleaner.
     @Test
     fun shouldKeepUris() {
         val html =
@@ -311,9 +313,9 @@ class HtmlSanitizerTest {
             <a href="https://example.com/default.html">HTTPS</a>
             <a href="mailto:user@example.com">Mailto</a>
             <a href="tel:00442079460111">Telephone</a>
+            <a href="sms:00442079460111">SMS</a>
             <a href="sip:user@example.com">SIP</a>
-            <a href="bitcoin:12A1MyfXbW6RhdRAZEqofac5jCQQjwEPBu">Bitcoin</a>
-            <a href="ethereum:0x89205A3A3b2A69De6Dbf7f01ED13B2108B2c43e7">Ethereum</a>
+            <a href="unknown:foobar">Unknown</a>
             <a href="rtsp://example.com/media.mp4">RTSP</a>
             </body>
             </html>
@@ -330,9 +332,9 @@ class HtmlSanitizerTest {
             <a href="https://example.com/default.html">HTTPS</a>
             <a href="mailto:user@example.com">Mailto</a>
             <a href="tel:00442079460111">Telephone</a>
+            <a href="sms:00442079460111">SMS</a>
             <a href="sip:user@example.com">SIP</a>
-            <a href="bitcoin:12A1MyfXbW6RhdRAZEqofac5jCQQjwEPBu">Bitcoin</a>
-            <a href="ethereum:0x89205A3A3b2A69De6Dbf7f01ED13B2108B2c43e7">Ethereum</a>
+            <a href="unknown:foobar">Unknown</a>
             <a href="rtsp://example.com/media.mp4">RTSP</a>
             </body>
             </html>