API client design: generating template code for client

You could wrap your recaptcha in a struct and have it implement Phoenix.HTML.Safe protocol