chore: restrict successful url launch to only http/https (#5028)

This commit is contained in:
Richard Shiue 2024-04-01 21:09:38 +08:00 committed by GitHub
parent 75e51fdeea
commit 440253f0d9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -72,10 +72,6 @@ class URLCellBloc extends Bloc<URLCellEvent, URLCellState> {
const linkPrefix = [
'http://',
'https://',
'file://',
'ftp://',
'ftps://',
'mailto:',
];
final shouldAddScheme =
!linkPrefix.any((pattern) => content.startsWith(pattern));