We'd like to remind Forumites to please avoid political debate on the Forum... Read More »
📨 Have you signed up to the Forum's new Email Digest yet? Get a selection of trending threads sent straight to your inbox daily, weekly or monthly!
URL & Brackets
Options

Exodi
Posts: 3,956 Forumite

Probably easier said than implemented, but I notice quite often that people using brackets can accidentally break URL's.
To make it obvious, what I mean is this (https://www.moneysavingexpert.com/).
In this example, it correctly identifies that http is the prefix for a URL and correctly creates a hyperlink, but it incorrectly ends the link with the bracket.
There must be some logic governing this, as in this example, it doesn't include the full stop as part of the URL.
Now the simple fix for the user is to put a space before the last bracket, but this feels unnecessary and assumes they notice. I'm sure many viewers may just assume the wrong link was posted.
I don't think that many URL's ever end in a closed bracket, so I'd suggest excluding this from URL's using the same logic that excludes the full stop in the above, or a space.
A real world example of the issue:
https://forums.moneysavingexpert.com/discussion/6542679/john-lewis-purchase-didnt-complete-sale-now-over-anything-i-can-do#latest
To make it obvious, what I mean is this (https://www.moneysavingexpert.com/).
In this example, it correctly identifies that http is the prefix for a URL and correctly creates a hyperlink, but it incorrectly ends the link with the bracket.
There must be some logic governing this, as in this example, it doesn't include the full stop as part of the URL.
Now the simple fix for the user is to put a space before the last bracket, but this feels unnecessary and assumes they notice. I'm sure many viewers may just assume the wrong link was posted.
I don't think that many URL's ever end in a closed bracket, so I'd suggest excluding this from URL's using the same logic that excludes the full stop in the above, or a space.
A real world example of the issue:
https://forums.moneysavingexpert.com/discussion/6542679/john-lewis-purchase-didnt-complete-sale-now-over-anything-i-can-do#latest
Know what you don't
0
Comments
-
It looks as if the forum software isn't clever enough to remove the bracket at the end, but it is removing the bracket at the start! Very odd indeed.
If it detects a bracket at the start and there is a corresponding closing bracket at the end - cut that off too. Shouldn't be too hard.
It might be a bug within logic performing a string slice/substring operation that needs a -1 applied to the end index.
0 -
booneruk said:It looks as if the forum software isn't clever enough to remove the bracket at the end, but it is removing the bracket at the start! Very odd indeed.
If it detects a bracket at the start and there is a corresponding closing bracket at the end - cut that off too. Shouldn't be too hard.
It might be a bug within logic performing a string slice/substring operation that needs a -1 applied to the end index.
It's not an MSE problem, but it does have workarounds: https://blog.codinghorror.com/the-problem-with-urls/Know what you don't0 -
I can well imagine it's tricky sometimes. I've had similar challenges throughout my career.
Of course, someone could actually run a URL with brackets in it too. https://testsite.net/) could be a valid working URL. Without checking it, you wouldn't know.
https://support.exactonline.com/community/s/knowledge-base#All-All-DNO-Content-urlcharacters
0 -
Hi everyone
We are currently using a legacy editor while we wait for some improvements to be made to a new version we hope to use in the future.
I just did a quick test to see what will happen when we switch to the new editor -
if you use brackets, then that makes the link remain as text rather than trying to hyperlink.
But usually for hyperlinks when you type or paste, the link will automatically change - giving you a choice for the format of the link:
Join the MSE Forum
Get the Free MoneySavingExpert Money Tips E-mail
To report inappropriate posts: click the report button
Flag a news story: news@moneysavingexpert.com1 -
Great, sounds like it won't be an issue for the new editor.Know what you don't0
Confirm your email address to Create Threads and Reply

Categories
- All Categories
- 351.1K Banking & Borrowing
- 253.1K Reduce Debt & Boost Income
- 453.6K Spending & Discounts
- 244.1K Work, Benefits & Business
- 599K Mortgages, Homes & Bills
- 177K Life & Family
- 257.4K Travel & Transport
- 1.5M Hobbies & Leisure
- 16.1K Discuss & Feedback
- 37.6K Read-Only Boards