Description
openedon Oct 10, 2022
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:
<mjml> <mj-body background-color="#fff"> <mj-section background-color="#ef6451"> <mj-column> <mj-navbar base-url="https://link.com" hamburger="hamburger" ico-color="#ffffff"> <mj-navbar-link href="#" color="#ffffff">Nav1</mj-navbar-link> <mj-navbar-link href="#" color="#ffffff">Nav2</mj-navbar-link> <mj-navbar-link href="#" color="#ffffff">Nav3</mj-navbar-link> <mj-navbar-link href="#" color="#ffffff">Nav4</mj-navbar-link> <mj-navbar-link href="#" color="#ffffff">Nav5</mj-navbar-link> </mj-navbar> </mj-column> </mj-section> <mj-section full-width="full-width"> <mj-column> <mj-text align="center" font-size="20px"> {{ title }} </mj-text> </mj-column> </mj-section> <mj-section> <mj-column> <mj-button font-family="Helvetica" background-color="#f45e43" color="white"> Button 1 </mj-button> </mj-column> <mj-column> <mj-button font-family="Helvetica" background-color="#f45e43" color="white"> Button 2 </mj-button> </mj-column> <mj-column> <mj-button font-family="Helvetica" background-color="#f45e43" color="white"> Button 3 </mj-button> </mj-column> </mj-section> </mj-body> </mjml>
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.
Any recommendations? Is this a limitation of the package?