Skip to content

Improve invalid path error handling, and escape single quotes in javascript#1174

Merged
rdmark merged 1 commit intodevelopfrom
rdmark-issue-1167
May 21, 2023
Merged

Improve invalid path error handling, and escape single quotes in javascript#1174
rdmark merged 1 commit intodevelopfrom
rdmark-issue-1167

Conversation

@rdmark
Copy link
Copy Markdown
Member

@rdmark rdmark commented May 21, 2023

I attempted using jinja2's built in escape filters, notable escape and tojson, but neither did what I needed with the single quotes. The current solution using the replace filter is a bit crude, but I needed to double escape the single quote to make the browser not interpret it "too early" to not break the javascript syntax. I think a better solution is to refactor the onsubmit event handler and put it in a script block rather than inline in the html element. I couldn't immediately think of how to do that for this dynamic table however.

@rdmark rdmark requested a review from nucleogenic May 21, 2023 16:11
Copy link
Copy Markdown
Member

@nucleogenic nucleogenic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@rdmark rdmark merged commit 1ce6fd1 into develop May 21, 2023
@rdmark rdmark deleted the rdmark-issue-1167 branch May 21, 2023 22:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants