Corewala / Buran

Gemini browser for Android
GNU General Public License v3.0
107 stars 10 forks source link

Buran treats "mailto:" links as Gemini links with relative URLs #8

Closed acidus99 closed 2 years ago

acidus99 commented 2 years ago

Buran thinks that mailto: links are gemini:// links with a relative URL.

If you are on gemini://example.com/ and click this link like

=> mailto:test@example.com Email me

Buran goes to the URL: gemini://example.com/mailto:test@example.com instead of what it should do, which is go to mailto:test@example.com which will launch the associated mail program (or nothing at all)

You don't need to specifically code for mailto: proper URL parsing would detect this. Parsing mailto:test@example.com should show a fully qualified URL with a scheme of mailto:. Its not a relative URL, because : is a reserved, general delimiter (according to the URL Generic Syntax RFC linked off the Gemini protocol spec) and it has to be escaped if used outside of the delimited between scheme or between hostname and port in the authority. Basically use a proper URL parsing library and you will be fine

Corewala commented 2 years ago

Fixed