Skip to content
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

Fixed issue when CSV data wasn't properly escaped in HTML output #60

Merged
merged 8 commits into from
Jul 14, 2018
Merged

Fixed issue when CSV data wasn't properly escaped in HTML output #60

merged 8 commits into from
Jul 14, 2018

Conversation

stokito
Copy link

@stokito stokito commented Apr 20, 2018

Each cell in CSV can contain special characters like <, > which can be considered by browser as a begging of HTML tag. This can broke layout and even can be used by a hacker for https://www.owasp.org/index.php/Cross-site_Scripting_(XSS)

  1. Improved performance by reusing jQuery object instead of getting it from DOM by selector each time.
  2. Use jQuery methods instead of manual HTML concatenation and manipulation.
  3. Escape html while rendering cell content

@stokito
Copy link
Author

stokito commented May 11, 2018

Please review my PR: it's simple but contains a security fix

@stokito
Copy link
Author

stokito commented Jul 14, 2018

Hi @derekeder

Could you please take a look on this patch? Thank you

@derekeder derekeder merged commit 255a6e6 into derekeder:master Jul 14, 2018
@derekeder
Copy link
Owner

@stokito thanks for this & sorry for my delay in reviewing. PR approved & merged

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.

None yet

2 participants