Skip to content

Commit

Permalink
remove sanitize-html
Browse files Browse the repository at this point in the history
  • Loading branch information
agatatalita committed Feb 16, 2019
1 parent e832d94 commit 4a609c2
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 89 deletions.
6 changes: 2 additions & 4 deletions modules/users/client/components/AboutMe.component.js
@@ -1,7 +1,5 @@
import React, { Component } from 'react';
import sanitizeHtml from 'sanitize-html';
import { withNamespaces } from '@/modules/core/client/utils/i18n-angular-load';
{/* import { Trans } from 'react-i18next'; */}
import '@/config/lib/i18n';
import PropTypes from 'prop-types';
import { limitTo, plainTextLength } from './utils/filters';
Expand Down Expand Up @@ -31,13 +29,13 @@ export class AboutMe extends Component {
<div className="panel-body">
{/* Short descriptions */}
{(profile.description.length < 2400 || this.state.profileDescriptionToggle) &&
<div dangerouslySetInnerHTML={{ __html: sanitizeHtml(profile.description) }}></div>}{/* TODO Can we trust this HTML?*/}
<div dangerouslySetInnerHTML={{ __html: profile.description }}></div>}

{/* Long descriptions */}
{profile.description.length >= 2400 && !this.state.profileDescriptionToggle &&
<div
className="panel-more-wrap">
<div className="panel-more-excerpt" dangerouslySetInnerHTML={{ __html: sanitizeHtml(limitTo(profile.description, 2400)) }}></div>
<div className="panel-more-excerpt" dangerouslySetInnerHTML={{ __html: limitTo(profile.description, 2400) }}></div>
<div className="panel-more-fade" onClick={this.changeProfileDescriptionToggle}>{t('Show more...')}</div>
</div>}

Expand Down
84 changes: 0 additions & 84 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion package.json
Expand Up @@ -168,7 +168,6 @@
"react-bootstrap": "~0.32.4",
"react-dom": "~16.6.3",
"react-i18next": "~8.4.0",
"sanitize-html": "^1.19.3",
"serve-favicon": "~2.5.0",
"speakingurl": "~14.0.1",
"stathat": "0.0.8",
Expand Down

0 comments on commit 4a609c2

Please sign in to comment.