You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm wondering why URI-encoding is left to the user?
I experimented a little this morning. In line 12 of headers.js, I inserted: request.headers.markdown = encodeURIComponent(request.headers.markdown);
Then, when I ran curl --location 'http://localhost:3000/blog/example' --header 'markdown: # Hello World' (I'll acknowledge it was difficult to get the original example markdown on one line, maybe that's part of it) I received a response including:
Great question! Long story short, the URL encoding was added later because of how our image URLs are formed (and some special characters that were output into blogs). The weird characters overall didn't consistently display unless the URL encoding was added.
I'm wondering why URI-encoding is left to the user?
I experimented a little this morning. In line 12 of headers.js, I inserted:
request.headers.markdown = encodeURIComponent(request.headers.markdown);
Then, when I ran
curl --location 'http://localhost:3000/blog/example' --header 'markdown: # Hello World'
(I'll acknowledge it was difficult to get the original example markdown on one line, maybe that's part of it) I received a response including:so it seemed to be working from the
curl
response, but it was not reflected in the browser:Curious about why this might be, but also, why the user must URI-encode as well.
The text was updated successfully, but these errors were encountered: