News for hackers. Stuff that matters.
Re:Building a fullstack app with Flask and HTMx by danjac on Tuesday March 29, 2022 @01:48PM (#30846008)
This code looks like it has an XSS vulnerability in the submit() method: returning plain f-string i.e.

    return f"<tr>
        <td>{title}</td>
        <td>{author_name}</td>
        <td>...."

Probably safer (and more maintainable) to just return a Jinja2 template instead.
Re:Building a fullstack app with Flask and HTMx by qatanah on Tuesday March 29, 2022 @08:02PM (#30849934)
Something I've wanted to comment on this as well. It's best to use render_template() when rendering the views so it doesn't tangle w/ a lot of python controller logic.