Author

Topic: The forum didn't detect ")" in URL links. (Read 129 times)

hero member
Activity: 510
Merit: 4005
August 22, 2024, 07:33:54 PM
#5
Foxpup is right. There's a pair of regexes that the auto-linker uses (the below are from 1.1.19):

'~(?<=[\s>\.(;\'"]|^)((?:http|https|ftp|ftps)://[\w\-_%@:|]+(?:\.[\w\-_%]+)*(?::\d+)?(?:/[\w\-_\~%\.@,\?&;=#(){}+:\'\\\\]*)*[/\w\-_\~%@\?;=#}\\\\])~i'

'~(?<=[\s>(\'<]|^)(www(?:\.[\w\-_]+)+(?::\d+)?(?:/[\w\-_\~%\.@,\?&;=#(){}+:\'\\\\]*)*[/\w\-_\~%@\?;=#}\\\\])~i'

If a piece near the end of each one were changed from #} to #)} then (I think) it would work in the way OP expected (but then, as Foxpup pointed out, enclosing URLs in parentheses would break).
legendary
Activity: 4542
Merit: 3393
Vile Vixen and Miss Bitcointalk 2021-2023
August 22, 2024, 06:37:18 PM
#4
It's just an ambiguity in the algorithm that determines what characters are or are not part of the URL; presumably it was expected that the more likely case would be a URL completely enclosed in parentheses, with the parentheses not being part of the URL itself (such as https://example.com).

You can avoid this by not relying on autodetection of URLs and instead manually using the [url][/url] tags.
hero member
Activity: 1554
Merit: 880
pxzone.online
August 22, 2024, 02:00:00 PM
#3
I crossed a post that has close parenthesis symbol aka ")" in URL links, specifically it's related to Bisq. I thought the forum ban this link, but after I made some research to find other URL link with close parenthesis symbol, the results is same...
You mean link with parenthesis are ban here? Or just bisq url?

I don't think its a bug, it depends on the machine software used by the forum if those symbol can be used for URLs or they will be automatically encoded, i experienced this while developing websites.
staff
Activity: 2436
Merit: 2347
August 22, 2024, 12:49:09 PM
#2
It's probably a bug. But you can hide the link and then it works.

Conda_(package_manager)
hero member
Activity: 1064
Merit: 843
August 22, 2024, 10:30:10 AM
#1
I crossed a post that has close parenthesis symbol aka ")" in URL links, specifically it's related to Bisq. I thought the forum ban this link, but after I made some research to find other URL link with close parenthesis symbol, the results is same https://en.wikipedia.org/wiki/Conda_(package_manager)

2. Face to face trade aka direct peer to peer, just like what stated on bisq https://bisq.wiki/Face-to-face_(payment_method)

The forum do detect the URL link if we encode the close parenthesis symbol and it's working fine.

https://bisq.wiki/Face-to-face_(payment_method%29

Is this a bug?
Jump to: