Hacker News new | past | comments | ask | show | jobs | submit login

I use tagged templates for ensuring URL paths are URI safe, like so:

    const path = esc`/my/api/v1/${possiblyURIUnsafeVariable}`



Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: