Comments (4)
I do not know what you mean. Please fill out the bug issue template and provide an example
from pairdrop.
Just send this link (invalid) and try to click on it on the receiving end ;)
https://onedrive.live.com/?authkey=%dfdsssdf7LJSM3w&id=88ADFF5%21285&cid=2DC78C46388A4354
What happens is exactly what i described in the title, only https://onedrive.live.com/?authkey=
is opened
from pairdrop.
ok lets fix it :))
maybe this?
https://www.freecodecamp.org/news/how-to-validate-urls-in-javascript/
try {
let url = new URL(message);
//set as link
} catch (err) {
//set as text
}
btw love the new design, also it seems to work more stable than before <3
from pairdrop.
The following comments were deleted by GitHub (via hubot) as part of mistakenly marking this account as spam on 17th February 2024. The correct thread order and the creation date is unclear. I decided to manually restore them anyway in order to complete the information this issue holds even though the restored information might be outdated:
Comment by @schlagmichdoch:
Thanks for the example!
Your title leaves multiple options:
- Sending links via send message dialog does not work properly
- Sending links via Android Share Menu does not work properly
- Sending links via iOS shortcut does not work properly
- Sending links via CLI does not work properly
- etc.
- Sending links does work properly but the links are not correctly converted to clickable links (the actual case)
Adding some general information and a step by step guide how to reproduce the issue makes it much easier to determine whats wrong. This repo is quite easy to maintain but on other repos you might not have gotten an answer in the first place.
This is an issue though. I did some testing:
This message:
www.test
www.test.com
https://test.com
http://test.com
https://test.com?auth=token&si=123
https://onedrive.live.com/?authkey=%dfdsssdf7LJSM3w&id=88ADFF5%21285&cid=2DC78C46388A4354
is converted to this html:
<a href="www.test" target="_blank">www.test</a><br>
<a href="www.test.com" target="_blank">www.test.com</a><br>
<a href="https://test.com" target="_blank">https://test.com</a><br>
<a href="http://test.com" target="_blank">http://test.com</a><br>
<a href="https://test.com?auth=token&si=123" target="_blank">https://test.com?auth=token&si=123</a><br>
<a href="https://onedrive.live.com/?authkey=" target="_blank">https://onedrive.live.com/?authkey=</a>%dfdsssdf7LJSM3w&id=88ADFF5%21285&cid=2DC78C46388A4354
Apparently, the URL replacement does not stop at the equal sign but at the percentage sign.
Also, www.test.com
should be replaced with http:/www.test.com
to prevent pointing https://pairdrop.net/www.test.com to and www.test
should not be a URL at all.
Comment by @schlagmichdoch:
maybe this? https://www.freecodecamp.org/news/how-to-validate-urls-in-javascript/
try { let url = new URL(message); //set as link } catch (err) { //set as text }
Not quite, as we donβt know yet where possible URLs are positioned. Instead, I used a REGEX substitution for this and enhanced it to fix this issue.
See
Lines 2018 to 2033 in ccb2170
from pairdrop.
Related Issues (20)
- Why did this repository disappear? HOT 12
- [Enhancement] Bring back the water ripples background animation HOT 1
- [Enhancement] Option: do not zip files and send them all individually HOT 1
- [Enhancement] Make sending and drag'n'drop of folders possible
- [Enhancement] If pasting or sharing text, make clearer what is shared
- [Enhancement] Native clients via Flutter HOT 1
- [Enhancement] Change font to Open Sans
- [Enhancement] Increase limit for sending to iPhones (200MB) by rewriting FileChunker / FileDigester HOT 1
- [Enhancement] Add Kannada language HOT 1
- [Bug] Buttons do not change color on hover
- [Enhancement] Add in-app QR-code scanner
- [Bug] Switching public rooms does not disconnect from devices in old public room
- [Bug] Duplicate "successful download" notification (Android app) HOT 3
- [Enhancement] How to make all clients mutually visible to each other? HOT 5
- [Bug] Installation not successful HOT 1
- [Enhancement] Document where I can load a signed ssl certificate
- [Enhancement] Don't compress files when sharing multiple files HOT 1
- [Enhancement] Hotspot - Offline file sharing HOT 4
- [Enhancement] Only open one dialog at a time
- [Bug] self hosting under a sub path not working HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pairdrop.