Work in progress on subscriptions
This commit is contained in:
parent
d9211377dd
commit
e73c0a8b28
42 changed files with 1558 additions and 678 deletions
|
@ -88,11 +88,13 @@ class TreeTable extends Component {
|
|||
|
||||
// XSS protection
|
||||
sanitizeTreeData(unsafeData) {
|
||||
const data = unsafeData.slice();
|
||||
for (const entry of data) {
|
||||
const data = [];
|
||||
for (const unsafeEntry of unsafeData) {
|
||||
const entry = Object.assign({}, unsafeEntry);
|
||||
entry.title = ReactDOMServer.renderToStaticMarkup(<div>{entry.title}</div>)
|
||||
entry.description = ReactDOMServer.renderToStaticMarkup(<div>{entry.description}</div>)
|
||||
entry.children = this.sanitizeTreeData(entry.children);
|
||||
data.push(entry);
|
||||
}
|
||||
return data;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue