clay / amphora

Middleware for Express that composes components into renderable pages
https://claycms.gitbooks.io/amphora/
MIT License
31 stars 23 forks source link

🍕 Rendering routes: Decode uris before rendering to prevent unexpected failures #712

Closed jjpaulino closed 1 year ago

jjpaulino commented 1 year ago

We're using decodeURIComponent to match any encoded value that might be sent/encoded by the browser. An example of this is a smart quote ’ -- That value is going to be encoded to %E2%80%99. We store the actual symbol in our database, not the encoded value, so, when decoding it, we need to ensure we can get the direct symbol and, in consequence, the page we're looking for.