SMF Development > Bug Reports
2.0.2, Spaces in website links
Antechinus:
I'm all in favour of making morons suffer for their stupidity. Natural selection and all that. ;)
MrPhil:
Natural selection doesn't work fast enough...
Anyway, it's very common to have something like mySite.com or sample.com, which don't go to real sites. As long as it doesn't cause the browser to blow up (at least, in a way that threatens site security or lets the browser into places it shouldn't go), and I've never seen that, I say just leave it alone. If fools want to waste their time pressing on shiny links, let 'em. It keeps them occupied and out of the way...
Storman™:
--- Quote ---I'm all in favour of making morons suffer for their stupidity. Natural selection and all that.
--- End quote ---
Agree +1 ;)
Like MrPhil, I say leave alone as there may be a legitimate reason why someone enters a url like that. Doesn't necesaariliy mean it's a real url that goes somewhere.
Guess an option would be to have a mod that does as you ask and maybe throws up an error message. However, certainly don't think this should be part of core functionality nor should it be considered a "bug".
Trekkie101:
We should validate our inputs, just as good practice, I think we should fix it for 2.1.
MrPhil:
"Validating inputs" implies that it should be fixed or rejected as soon as someone clicks the Submit button. Are there any cases where BBCode etc. is checked upon input, rather than upon output? I think it would be more practical (if you want to do something about it) to check upon output for invalid characters in the href string. Ditto for images, etc.
Of course, from the resources-used point of view, it's better to format a post (process BBCode) up front once upon saving and save the processed version alongside the raw markup. It's possible that there might be some tags not resolvable until output time, but at least most of the BBCode processing will have been done ahead of time, saving server resources by not formatting over and over.
I still don't think it's worthwhile to worry about malformed URLs, unless it can be shown that it's a browser stability or security issue. Of course, others may feel differently. As I said before, sometimes they're not intended to be real domains or URLs, and it would be unnecessarily confusing to have error messages pop up (possibly better to highlight the presumed URL in some odd color and leave it inactive?).
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version