I'm trying to handle raw html and pass it onto fasthtml
from fasthtml.common import *
...
@rt('/test/')
def test():
raw_content1 = "<button>button 1</button>"
return Div( ft_html(raw_content1) )
getting this instead of a div wrapped button
<div>
<<button>button 1</button>></<button>button 1</button>> </div>
How do I properly handle that in FastHTML?
you can use NotStr:
from fasthtml.common import *
...
@rt('/test/')
def test():
raw_content1 = "<button>button 1</button>"
return Div( NotStr(raw_content1) )