Announcement_spawn with html link

Hi,

I’d like to display an announcement on the “spawn” page that comprises an HTML link to redirect the user to an external site. I tried following syntax in the values.yaml file of my helm chart:

templateVars:
      announcement_spawn: |
        Custom message with a link <a href=\"https://www.google.com\">Visit google!</a>

The message renders properly, unfortunately the URL is “re-written” and appended to the current jupyterhub URL:

https://myjupyterhub.mycompany.corp/hub/%22https://www.google.com%22

Is it possible to avoid this rewritting and to redirect outside of jupyterhub somehow ?

Thanks for your help

I think you probably shouldn’t escape the quotes in your yaml, so it should be href="https://..."

Hello minrk
Thanks for your suggestion , but I face an error 500 when I don’t escape the quotes in the yaml file…

Can you share the error from the logs?

Hello,
After further investigation, I figured out that the error 500 was due to the “>” character ending the string. I simply added a whitespace at the end and everything worked as expected.
Thanks for your help !