Hello, I am trying to make a simple web app, following a tutorial, that calculates a dampened vibration equation and returns a png of the result to the h
Try adding the section meta charset="utf-8" into the HEAD section of your template. That worked for me :-)
The beginning of the data in the template gives a clue to what's happening. ' is the HTML entity for a single quote '. Combined with the preceding b, b', it looks like the representation of a byte string, rather than the contents of the string.
Decode the byte string to a string before trying to render them with Jinja.
render_template('result.html', result=figdata_png.decode('utf8'))
Jinja renders the string representation of objects in {{ }}. The string representation of a byte string includes the b'' to distinguish it from a Unicode string. So you have to decode in order to display their value directly.