Author

Topic: URLs with brackets are broken (Read 892 times)

legendary
Activity: 1789
Merit: 2535
Goonies never say die.
May 17, 2016, 04:58:44 PM
#8
I just noticed that if a URL contains brackets, it breaks linking.

You could use this one as an example:
https://www.whattomine.com/asic?utf8=%E2%9C%93&factor[sha256_hr]=1155.0&factor[sha256_p]=590.0&scryptf=true&factor[scrypt_hash_rate]=400.0&factor[scrypt_power]=1400.0&factor[cost]=0&sort=Profitability24&volume=0&revenue=24h&factor[exchanges][]=&factor[exchanges][]=bittrex&factor[exchanges][]=bleutrade&factor[exchanges][]=btc_e&factor[exchanges][]=bter&factor[exchanges][]=c_cex&factor[exchanges][]=cryptopia&factor[exchanges][]=poloniex&factor[exchanges][]=yobit&dataset=&commit=Calculate

Easiest solution on your end would be:

Left square bracket: [
Right square bracket: ]

new url:

Code:
https://www.whattomine.com/asic?utf8=%E2%9C%93&factor[sha256_hr]=1155.0&factor[sha256_p]=590.0&scryptf=true&factor[scrypt_hash_rate]=400.0&factor[scrypt_power]=1400.0&factor[cost]=0&sort=Profitability24&volume=0&revenue=24h&factor[exchanges][]=&factor[exchanges][]=bittrex&factor[exchanges][]=bleutrade&factor[exchanges][]=btc_e&factor[exchanges][]=bter&factor[exchanges][]=c_cex&factor[exchanges][]=cryptopia&factor[exchanges][]=poloniex&factor[exchanges][]=yobit&dataset=&commit=Calculate


EDIT: grue's way is better! I thought I was giving you the corresponding html entities but I wasn't, bad google search and not enough thought, the URL will still work but encoding the url is what should be done.



=1155.0&factor[sha256_p]=590.0&scryptf=true&factor[scrypt_hash_rate]=400.0&factor[scrypt_power]=1400.0&factor[cost]=0&sort=Profitability24&volume=0&revenue=24h&factor[exchanges][]=&factor[exchanges][]=bittrex&factor[exchanges][]=bleutrade&factor[exchanges][]=btc_e&factor[exchanges][]=bter&factor[exchanges][]=c_cex&factor[exchanges][]=cryptopia&factor[exchanges][]=poloniex&factor[exchanges][]=yobit&dataset=&commit=Calculate]https://www.whattomine.com/asic?utf8=%E2%9C%93&factor[sha256_hr]=1155.0&factor[sha256_p]=590.0&scryptf=true&factor[scrypt_hash_rate]=400.0&factor[scrypt_power]=1400.0&factor[cost]=0&sort=Profitability24&volume=0&revenue=24h&factor[exchanges][]=&factor[exchanges][]=bittrex&factor[exchanges][]=bleutrade&factor[exchanges][]=btc_e&factor[exchanges][]=bter&factor[exchanges][]=c_cex&factor[exchanges][]=cryptopia&factor[exchanges][]=poloniex&factor[exchanges][]=yobit&dataset=&commit=Calculate

I'm not sure which part of the post the meme is intended but I think I've cleared up my post now Tongue   If your questioning why the URL you posted doesn't work, hover the mouse over the link and look in the status bar, it will not be the full URL, and the values will not be accurate on the site.
vip
Activity: 1428
Merit: 1145
May 17, 2016, 04:18:01 PM
#7
I just noticed that if a URL contains brackets, it breaks linking.

You could use this one as an example:
https://www.whattomine.com/asic?utf8=%E2%9C%93&factor[sha256_hr]=1155.0&factor[sha256_p]=590.0&scryptf=true&factor[scrypt_hash_rate]=400.0&factor[scrypt_power]=1400.0&factor[cost]=0&sort=Profitability24&volume=0&revenue=24h&factor[exchanges][]=&factor[exchanges][]=bittrex&factor[exchanges][]=bleutrade&factor[exchanges][]=btc_e&factor[exchanges][]=bter&factor[exchanges][]=c_cex&factor[exchanges][]=cryptopia&factor[exchanges][]=poloniex&factor[exchanges][]=yobit&dataset=&commit=Calculate

Easiest solution on your end would be:

Left square bracket: [
Right square bracket: ]

new url:

Code:
https://www.whattomine.com/asic?utf8=%E2%9C%93&factor[sha256_hr]=1155.0&factor[sha256_p]=590.0&scryptf=true&factor[scrypt_hash_rate]=400.0&factor[scrypt_power]=1400.0&factor[cost]=0&sort=Profitability24&volume=0&revenue=24h&factor[exchanges][]=&factor[exchanges][]=bittrex&factor[exchanges][]=bleutrade&factor[exchanges][]=btc_e&factor[exchanges][]=bter&factor[exchanges][]=c_cex&factor[exchanges][]=cryptopia&factor[exchanges][]=poloniex&factor[exchanges][]=yobit&dataset=&commit=Calculate


EDIT: grue's way is better! I thought I was giving you the corresponding html entities but I wasn't, bad google search and not enough thought, the URL will still work but encoding the url is what should be done.



=1155.0&factor[sha256_p]=590.0&scryptf=true&factor[scrypt_hash_rate]=400.0&factor[scrypt_power]=1400.0&factor[cost]=0&sort=Profitability24&volume=0&revenue=24h&factor[exchanges][]=&factor[exchanges][]=bittrex&factor[exchanges][]=bleutrade&factor[exchanges][]=btc_e&factor[exchanges][]=bter&factor[exchanges][]=c_cex&factor[exchanges][]=cryptopia&factor[exchanges][]=poloniex&factor[exchanges][]=yobit&dataset=&commit=Calculate]https://www.whattomine.com/asic?utf8=%E2%9C%93&factor[sha256_hr]=1155.0&factor[sha256_p]=590.0&scryptf=true&factor[scrypt_hash_rate]=400.0&factor[scrypt_power]=1400.0&factor[cost]=0&sort=Profitability24&volume=0&revenue=24h&factor[exchanges][]=&factor[exchanges][]=bittrex&factor[exchanges][]=bleutrade&factor[exchanges][]=btc_e&factor[exchanges][]=bter&factor[exchanges][]=c_cex&factor[exchanges][]=cryptopia&factor[exchanges][]=poloniex&factor[exchanges][]=yobit&dataset=&commit=Calculate
legendary
Activity: 2422
Merit: 1451
Leading Crypto Sports Betting & Casino Platform
May 17, 2016, 01:20:21 PM
#6
If a URL contains brackets, then the webmaster is a dummy.

Unsafe:

   Characters can be unsafe for a number of reasons.  The space
   character is unsafe because significant spaces may disappear and
   insignificant spaces may be introduced when URLs are transcribed or
   typeset or subjected to the treatment of word-processing programs.
   The characters "<" and ">" are unsafe because they are used as the
   delimiters around URLs in free text; the quote mark (""") is used to
   delimit URLs in some systems.  The character "#" is unsafe and should
   always be encoded because it is used in World Wide Web and in other
   systems to delimit a URL from a fragment/anchor identifier that might
   follow it.  The character "%" is unsafe because it is used for
   encodings of other characters.  Other characters are unsafe because
   gateways and other transport agents are known to sometimes modify
   such characters. These characters are "{", "}", "|", "\", "^", "~",
   "[", "]", and "`".

   All unsafe characters must always be encoded within a URL. For
   example, the character "#" must be encoded within URLs even in
   systems that do not normally deal with fragment or anchor
   identifiers, so that if the URL is copied into another system that
   does use them, it will not be necessary to change the URL encoding.
I certainly wouldn't go contacting every webmaster doing this telling them that it's a bad practice. Brackets in URLs aren't that common but it'd be better for the forum to fix this, not allowing URLs to be broken so easily. Not that it's an urgently needed fix, but more of an aesthetic/time saving feature. 
legendary
Activity: 1512
Merit: 1036
May 17, 2016, 12:18:49 PM
#5
If a URL contains brackets, then the webmaster is a dummy.

Unsafe:

   Characters can be unsafe for a number of reasons.  The space
   character is unsafe because significant spaces may disappear and
   insignificant spaces may be introduced when URLs are transcribed or
   typeset or subjected to the treatment of word-processing programs.
   The characters "<" and ">" are unsafe because they are used as the
   delimiters around URLs in free text; the quote mark (""") is used to
   delimit URLs in some systems.  The character "#" is unsafe and should
   always be encoded because it is used in World Wide Web and in other
   systems to delimit a URL from a fragment/anchor identifier that might
   follow it.  The character "%" is unsafe because it is used for
   encodings of other characters.  Other characters are unsafe because
   gateways and other transport agents are known to sometimes modify
   such characters. These characters are "{", "}", "|", "\", "^", "~",
   "[", "]", and "`".

   All unsafe characters must always be encoded within a URL. For
   example, the character "#" must be encoded within URLs even in
   systems that do not normally deal with fragment or anchor
   identifiers, so that if the URL is copied into another system that
   does use them, it will not be necessary to change the URL encoding.
legendary
Activity: 2058
Merit: 1452
May 17, 2016, 08:30:34 AM
#4
The proper way is to url encode it. Your url would encode to:
Code:
https://www.whattomine.com/asic?utf8=%25E2%259C%2593&factor%5Bsha256_hr%5D=1155.0&factor%5Bsha256_p%5D=590.0&scryptf=true&factor%5Bscrypt_hash_rate%5D=400.0&factor%5Bscrypt_power%5D=1400.0&factor%5Bcost%5D=0&sort=Profitability24&volume=0&revenue=24h&factor%5Bexchanges%5D%5B%5D=&factor%5Bexchanges%5D%5B%5D=bittrex&factor%5Bexchanges%5D%5B%5D=bleutrade&factor%5Bexchanges%5D%5B%5D=btc_e&factor%5Bexchanges%5D%5B%5D=bter&factor%5Bexchanges%5D%5B%5D=c_cex&factor%5Bexchanges%5D%5B%5D=cryptopia&factor%5Bexchanges%5D%5B%5D=poloniex&factor%5Bexchanges%5D%5B%5D=yobit&dataset=&commit=Calculate

You can do it within your browser's developer console by using
Code:
encodeURI("your url here")
hero member
Activity: 574
Merit: 503
V2h5IGFyZSB5b3UgcmVhZGluZyB0aGlzPw==
legendary
Activity: 1789
Merit: 2535
Goonies never say die.
May 16, 2016, 08:19:48 AM
#2
I just noticed that if a URL contains brackets, it breaks linking.

You could use this one as an example:
https://www.whattomine.com/asic?utf8=%E2%9C%93&factor[sha256_hr]=1155.0&factor[sha256_p]=590.0&scryptf=true&factor[scrypt_hash_rate]=400.0&factor[scrypt_power]=1400.0&factor[cost]=0&sort=Profitability24&volume=0&revenue=24h&factor[exchanges][]=&factor[exchanges][]=bittrex&factor[exchanges][]=bleutrade&factor[exchanges][]=btc_e&factor[exchanges][]=bter&factor[exchanges][]=c_cex&factor[exchanges][]=cryptopia&factor[exchanges][]=poloniex&factor[exchanges][]=yobit&dataset=&commit=Calculate

Easiest solution on your end would be:

Left square bracket: [ %5B
Right square bracket: ] %5D

new url:

https://www.whattomine.com/asic?utf8=%E2%9C%93&factor[sha256_hr]=1155.0&factor[sha256_p]=590.0&scryptf=true&factor[scrypt_hash_rate]=400.0&factor[scrypt_power]=1400.0&factor[cost]=0&sort=Profitability24&volume=0&revenue=24h&factor[exchanges][]=&factor[exchanges][]=bittrex&factor[exchanges][]=bleutrade&factor[exchanges][]=btc_e&factor[exchanges][]=bter&factor[exchanges][]=c_cex&factor[exchanges][]=cryptopia&factor[exchanges][]=poloniex&factor[exchanges][]=yobit&dataset=&commit=Calculate

Code:
https://www.whattomine.com/asic?utf8=%25E2%259C%2593&factor%5Bsha256_hr%5D=1155.0&factor%5Bsha256_p%5D=590.0&scryptf=true&factor%5Bscrypt_hash_rate%5D=400.0&factor%5Bscrypt_power%5D=1400.0&factor%5Bcost%5D=0&sort=Profitability24&volume=0&revenue=24h&factor%5Bexchanges%5D%5B%5D=&factor%5Bexchanges%5D%5B%5D=bittrex&factor%5Bexchanges%5D%5B%5D=bleutrade&factor%5Bexchanges%5D%5B%5D=btc_e&factor%5Bexchanges%5D%5B%5D=bter&factor%5Bexchanges%5D%5B%5D=c_cex&factor%5Bexchanges%5D%5B%5D=cryptopia&factor%5Bexchanges%5D%5B%5D=poloniex&factor%5Bexchanges%5D%5B%5D=yobit&dataset=&commit=Calculate


EDIT: grue's way is better! I'm an idiot for putting the crossed-out url above. I usually don't lookup the values and should have just used the urlencode() function to get the url but it seemed easier to lookup the values at the time, and I ended up on a site giving special characters. MY BAD!  Grin
legendary
Activity: 2422
Merit: 1451
Leading Crypto Sports Betting & Casino Platform
May 16, 2016, 05:02:16 AM
#1
I just noticed that if a URL contains brackets, it breaks linking.

You could use this one as an example:
https://www.whattomine.com/asic?utf8=%E2%9C%93&factor[sha256_hr]=1155.0&factor[sha256_p]=590.0&scryptf=true&factor[scrypt_hash_rate]=400.0&factor[scrypt_power]=1400.0&factor[cost]=0&sort=Profitability24&volume=0&revenue=24h&factor[exchanges][]=&factor[exchanges][]=bittrex&factor[exchanges][]=bleutrade&factor[exchanges][]=btc_e&factor[exchanges][]=bter&factor[exchanges][]=c_cex&factor[exchanges][]=cryptopia&factor[exchanges][]=poloniex&factor[exchanges][]=yobit&dataset=&commit=Calculate
Jump to: