Search code examples
apiqr-code

'#' character is not accepted in QR code API from google charts, how to make it work?


I am using google charts to generate QR code, html address that needs to associated with QR code image contains "#" and it breaks url. And shows only part of url before '#'.

Example: https://chart.googleapis.com/chart?cht=qr&chs=300x300&chl=https://eservices.esma.gov.ae/#/app/certificateDetail/71990

Any ideas how to fix it?


Solution

  • # marks the fragment portion of your Google Charts URL, which is not sent to the server.

    You need to URL-encode the parameter.