Question: I have a string that contains "em" tag when I pass it into Html. It do not work.

```
'''
string = asked her if she wanted to use <em>drugs</em>

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Result</title>
</head>
<body>
  <span> string </p>
</body>
</html>
'''

```

Is there any way that I don't have to change my original string and make it works in HTML?
I am using Flask package

[Image example](https://i.stack.imgur.com/PPJro.png)

Answer: 
I just tested this, because usually html tags like that should work with out anything needed in addition.

No need to do anything special for example when creating a dynamic webpage through flask things like links you will pass through functions such as `url_for()` to keep an updated version of your webpage.

I thought this seemed odd, so I just threw open one of my flask webapps in development mode and I confirmed, the `<em>` tag worked fine, nothing additional was needed.

You are doing something else wrong on the page that is not allowing the `<em>` tag to work.

If what you are trying to do here is pass it through a string, all the string text will be interpreted as is, always. It will always come out as `<em></em>` if that is what you are doing, that would be your issue.

You would need to add `<em></em>` to the entire string. If you needed only that part of the string to have that tag, if you created another string and added it to the end of that line, it would be `<em>string2</em>` and that would work.
you should add the keyword safe to tell jinja2 that you escaped the string yourself and that it is safe to render it, so include

```
  <span> {{string|safe}} </p>

```

in your template