-
Notifications
You must be signed in to change notification settings - Fork 2
Use PageFlowUtil.jsString to escape container path #522
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use PageFlowUtil.jsString to escape container path #522
Conversation
| pageConfig.addHandler(spanId, "click", "viewExperimentDetails(this,'" + container.getPath() + "', '" + id + "','" + detailsPage + "')"); | ||
| pageConfig.addHandler(spanId, "click", "viewExperimentDetails(this," | ||
| + PageFlowUtil.jsString(container.getPath()) | ||
| + ", '" + id + "', " |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might as well handle them all the same way.
| + ", '" + id + "', " | |
| + ", " + PageFlowUtil.jsString(id) + ", " |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'id' is a non-null Integer so does not need to be quoted, I think.
I added some HTML-escaping in related code. If you could take another look that would be great.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're right. I somehow thought it was a string.
…as parameter to a JS function.
…d by dropDownUtils.js
Co-authored-by: Josh Eckels <jeckels@labkey.com>
Rationale
Properly escape folder names passed as parameter to JS function, otherwise names containing single quotes cause JavaScript error.