Issue
I tried to display a string on a webpage with this Flask code:
@app.route('/')
def index():
return 'Variable can be of different types: string and <int>'
and got
Variable can be of different types: string and
without "<>". A way to fix it is to add a space between "<" and "int" like:
Variable can be of different types: string and < int >.
Also I noticed that the space for the closing > as in "< int>" doesn't matter.
Other characters such as [int] and {int} have no such a problem. Why? tag related?
Solution
Yes, it is tags related, it gonna be shows up like this
If you use the less than (<) or greater than (>) signs in your text, the browser might mix them with tags.
However, if you want to still display that, you can just do this
For more reference, here
Answered By - Aethereal
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.