poppingmoon / aria

A cross-platform Misskey client built with Flutter
https://misskey.io/@aria_app
GNU Affero General Public License v3.0
126 stars 4 forks source link

Mentions of the users with dots aren't rendered correctly #381

Closed FitikWasTaken closed 1 month ago

FitikWasTaken commented 1 month ago

💡 Summary

Threads and Bluesky (Bridgy) accounts can have . In usernames, Sharkey renders mentions mentioning them correctly, but Aria doesn't

According to the webfinger specs these 4 characters are allowed in the usernames: - _ . ~

https://www.w3.org/community/reports/socialcg/CG-FINAL-apwf-20240608/#names

Aria supports only the first two, I never seen an account with a tilde, but they're theoretically possible, so it would be nice to support them too

🥰 Expected Behavior

It should be a clickable mention just as with any other

This is an example from browser Screenshot_20240902-123158

🤬 Actual Behavior

It only mentions the first word, and cuts on a dot

This is an example from the app Screenshot_20240902-123120

📝 Steps to Reproduce

No response

💻 Environment

* Model and OS of the device(s): Android 13
* Aria: 0.14.4
* Server URL: kitty.social
* Sharkey: 2024.5.1

Do you want to address this bug yourself?

poppingmoon commented 1 month ago

Thanks for the information.

It seems that the document says various symbols (those from sub-delims and "%") are also allowed for the userpart in the scheme defined in RFC 7565. It also provides de facto rules in https://www.w3.org/community/reports/socialcg/CG-FINAL-apwf-20240608/#rules which allows "_", "-" and ".". I would rather follow the second rule for now because the first one may break some sort of MFMs, and the second one only needs a small change to achieve.

Also, there is a relevant Misskey issue at https://github.com/misskey-dev/mfm.js/issues/143. Once they decide to accept full rules from RFC 7565, I will update the parser again.