Closed enac21 closed 1 year ago
From the mjml-nav
's source code, it looks like they use crypto.randomBytes
: https://github.com/mjmlio/mjml/blob/0f13e1b91e08683ae05655db05f4cfa5e57e57dd/packages/mjml-navbar/src/Navbar.js#L108
I wonder if this is something that can be polyfilled in the wasm binary to work around this.
They want to replace the crypto package soon. Thanks!! https://github.com/mjmlio/mjml/pull/2478
That's great news! I'll upgrade to that release as soon as it's available.
This should be fixed in v0.14.2
as it incorporates MJML v4.14.1 which contains https://github.com/mjmlio/mjml/pull/2478
I want to format the following template but I get this error in the jsonResult (res) object at the time of making the json.Unmarshal (mjml.go line 204)
Template: `
`
Err: Secure random number generation is not supported by this browser. Use Chrome, Firefox or Internet Explorer 11
Im using a IDE to test it and go 1.18.2. I execute the method with these options:
mjml.ToHTML(context.Background(), stringTemplate, mjml.WithFonts(mjml.Fonts{}), mjml.WithBeautify(true), mjml.WithMinify(true), mjml.WithValidationLevel("skip"))
After several tests I know that the error comes from the section that includes the navbar, it only happens when the navbar is added.
Template in online editor
Any recommendations? Is this a limitation of the package?