Properly urlencode extension block selectors and inputs

Transfer of #137.
Fixes #136.