nextstrain / nextstrain.org

The Nextstrain website
https://nextstrain.org
GNU Affero General Public License v3.0
88 stars 49 forks source link

Use "href" template literals for safe-by-construction URL strings #687

Closed tsibley closed 1 year ago

tsibley commented 1 year ago

Avoids having to write out encodeURIComponent(), which is quite a mouthful!

Testing

tsibley commented 1 year ago

In discussion in Slack, @joverlee521 suggested uri instead of href. I'd be fine with this name too.

tsibley commented 1 year ago

uri's probably better, even if href feels cuter to me, so I renamed it here.

tsibley commented 1 year ago

@joverlee521 Fair enough! I added comments and repushed.