npmjs.org package pages are missing percent-encoding for keyword hyperlinks

website
priority:low
triaged

(wilmoore) #1

What I Wanted to Do

I expected to be sent here: https://www.npmjs.com/search?q=keywords%3A"parser%20combinators"

What Happened Instead

I was sent here instead: https://www.npmjs.com/search?q=keywords:parser%20combinators

Reproduction Steps

  1. Go to https://www.npmjs.com/package/parsimmon.
  2. Scroll down to the bottom of the page until you see the Keywords section.
  3. Click the only keyword “phrase” (multi-word term) which is parser combinators.
  4. The URL navigated to is https://www.npmjs.com/search?q=keywords:parser%20combinators

Details

Broken URL (current)
<a ... href="/search?q=keywords:parser combinators">parser combinators</a>
Correct URL
<a ... href="/search?q=keywords%3Aparser%20combinators">parser combinators</a>
Node.js API
querystring.escape('keywords:parser combinators')

Platform Info

Google Chrome: Version 70.0.3538.102 (Official Build) (64-bit)

Prior Art

  1. website keyword search broken for keywords with spaces