Skip to content

Commit

Permalink
Merge pull request #91 from jobready/NEP-9779
Browse files Browse the repository at this point in the history
NEP-9779 React filter-bar: XSS proofing
  • Loading branch information
hanpeic authored Jun 2, 2020
2 parents 53f440b + dfc6689 commit 9e609d7
Show file tree
Hide file tree
Showing 8 changed files with 16,813 additions and 20,654 deletions.
6,037 changes: 3,469 additions & 2,568 deletions dist/react-filterbar.js

Large diffs are not rendered by default.

25 changes: 13 additions & 12 deletions dist/react-filterbar.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion example/books.json

Large diffs are not rendered by default.

6,039 changes: 3,470 additions & 2,569 deletions example/public/js/react-filterbar.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions example/views/index.haml
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,7 @@
%dl.author
%dt.heading{ data: { value: "Author" } }
%dt.field{ data: { value: "author" } }
%dt.type{ data: { value: "html" } }
%dl.title
%dt.heading{ data: { value: "Title" } }
%dt.field{ data: { value: "title" } }
Expand Down
25,346 changes: 9,846 additions & 15,500 deletions package-lock.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-filterbar",
"version": "1.20",
"version": "1.21",
"description": "",
"main": "dist/react-filterbar.js",
"engines": {
Expand Down
15 changes: 12 additions & 3 deletions src/components/Table/BodyCell.react.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,18 @@ export class BodyCell extends React.Component {
render() {
var content = this.props.value;

return (
<td style={this.props.style} dangerouslySetInnerHTML={{__html: content}} />
);
if (this.props.type === 'html') {
return (
<td style={this.props.style} dangerouslySetInnerHTML={{__html: content}} />
);
}
else {
return (
<td style={this.props.style}>
{content}
</td>
);
}
}
}

Expand Down

0 comments on commit 9e609d7

Please sign in to comment.