cyberboysumanjay / Carbon-API

Unofficial API for generating beautiful images of your source code using Carbon.
https://carbonnowsh.herokuapp.com/
GNU Lesser General Public License v3.0
190 stars 45 forks source link

in # char "%23" #4

Open raifpy opened 4 years ago

raifpy commented 4 years ago

return Default Carbon Page .. image

raifpy commented 4 years ago

Also \n "%0A" not working ..

cyberboysumanjay commented 4 years ago

It seems I have to encode the URL before hitting a request to the Carbon. Thanks for reporting. I'll try to fix it

sesamechicken commented 3 years ago

@cyberboysumanjay is this still actively maintained? I am facing the same issue with newlines/carriage returns.

snehsagarajput commented 3 years ago

Passing the code through any url-safe function will do the job:

import urllib.parse
urllib.parse.quote_plus(code)