1

I am trying to pass on the unicode characters (like tickmark) from Flask python to HTML code. Even though I use u"character" the symbol is not recognized in HTML code

My HTML code:

 <form action="" method=post enctype=multipart/form-data>
   pp:<input type=file name=pp required> <br> {{pp}}
 <br>
 <input type=submit value=Upload name=submit_button>

</form>

Flask:

return render_html('index.html',pp=u"&#9989")
<some code>>
      return redirect(url_for('index',pp=u"&#9989))

The string &#9989 is getting passed to the HTML rather than a symbol

Please advice

Thank you in advance

python_interest
  • 874
  • 1
  • 9
  • 27

1 Answers1

0

I used Markup to send the character from flask to HTML and it worked

python_interest
  • 874
  • 1
  • 9
  • 27
  • I passed the Java Source code as on https://www.fileformat.info/info/unicode/char/25b2/index.htm. Here is one example: pp="\u25B2" – Al Martins Apr 15 '22 at 07:53