Blockchair / Blockchair.Support

Public repository for issues and feature requests. Submit your favorite bug!
444 stars 321 forks source link

Transactions / addresses are not trimmed before search #267

Open smartpunter opened 4 years ago

smartpunter commented 4 years ago

When copy/pasting address sometimes whitespace is copied in the beginning/end of address/transaction. As valid addresses/transactions can not contain whitespaces, it is a good idea to trim entered value (remove \s symbols from beginning and end) before performing the search.

Example of invalid links, which should work: https://blockchair.com/bitcoin/address/%203KJwXM4AFPHMMkdaLinaHw4CSvhSXerz5k https://blockchair.com/bitcoin/transaction/%208960b0bb48e5686d5acd0bf0d8730586d4938a66f81e148c63ee40e9413202f2

Strange, but for search you already trim data... this link works. https://blockchair.com/search?q=%208960b0bb48e5686d5acd0bf0d8730586d4938a66f81e148c63ee40e9413202f2

Har01d commented 4 years ago

The universal search box trims the input and shows the results. Direct links don’t perform search, these endpoints simply hit the API directly in accordance with some regexes. As 99.99% of the end users would just paste their addresses into the search box instead of the address bar this way, I don’t think we’ll be rewriting these endpoints to add trimming at the moment.