Apostrophes stop Analytics dashboard rendering when embedded in Creator

Apostrophes stop Analytics dashboard rendering when embedded in Creator

I have an Analytics dashboard which I am embedding into a Creator page, prefiltered to the organisations that the user belongs to.  This works beautifully, except when an organisation name includes an apostrophe, at which point the Creator page thinks it is a single quote and falls over.

The vital bit of code is this
  1. //info organisation_names   (returns ‘St John's College’,‘Toytown College’)

  2. embedCode = https://analytics.zoho.eu/open-view/14707300000035XXXX?ZOHO_CRITERIA=%22Dashboard%22.%22Organisation%22%20IN%20%28 + EncodeURL(organisation_names) + "%29";

Does anyone know what special character I need to add to make the apostrophe render properly please?  I tried a \ but that didn't work.  Or if I can't use apostrophes in URLs, has anyone else found a workaround?  At present, we've had to amend the names of the organisations our users belong to, but that is less than ideal.

Many thanks