<commit_before>import React, { PropTypes } from 'react';
// import AuthorBio from './AuthorBio';
import styles from './style.css';

const ListHeader = ({ contentType, contentId, users, categories, tags }) => {
  if (contentType === 'Category' && categories[contentId]) return (
    <h1 className={styles.listHeader}>
      {`${contentType}: ${categories[contentId].name}`}
    </h1>
  );

  if (contentType === 'Tag' && tags[contentId]) return (
    <h1 className={styles.listHeader}>
      {`${contentType}: ${tags[contentId].name}`}
    </h1>
  );

  if (contentType === 'Author' && users[contentId]) {
    const { name, description, avatar_urls } = users[contentId];

    return (
      <div className={styles.authorBio}>
        <img
          className={styles.authorAvatar}
          alt="Author's avatar"
          src={avatar_urls[96]}
        />
        <h1 className={styles.authorName}>
          {name}
        </h1>
        <p className={styles.authorDescription}>
          {description}
        </p>
      </div>
    );
  }

  return null;
};

ListHeader.propTypes = {
  contentType: PropTypes.string.isRequired,
  contentId: PropTypes.string.isRequired,<commit_msg>Parses HTML comming from user.description<commit_after>/* eslint-disable react/no-danger */
import React, { PropTypes } from 'react';
import CaptureLinks from '../../Post/CaptureLinks';
import styles from './style.css';

const ListHeader = ({ contentType, contentId, users, categories, tags }) => {
  if (contentType === 'Category' && categories[contentId]) return (
    <h1 className={styles.listHeader}>
      {`${contentType}: ${categories[contentId].name}`}
    </h1>
  );

  if (contentType === 'Tag' && tags[contentId]) return (
    <h1 className={styles.listHeader}>
      {`${contentType}: ${tags[contentId].name}`}
    </h1>
  );

  if (contentType === 'Author' && users[contentId]) {
    const { name, description, avatar_urls } = users[contentId];

    return (
      <div className={styles.authorBio}>
        <img
          className={styles.authorAvatar}
          alt="Author's avatar"
          src={avatar_urls[96]}
        />
        <h1 className={styles.authorName}>
          {name}
        </h1>
        <CaptureLinks>
          <p
            className={styles.authorDescription}
            dangerouslySetInnerHTML={{ __html: description }}
          />
        </CaptureLinks>
      </div>
    );
  }

  return null;
};

ListHeader.propTypes = {
  contentType: PropTypes.string.isRequired,
  contentId: PropTypes.string.isRequired,
{'fraction_non_alphanumeric': 0.15924320063066613, 'fraction_numerical': 0.0063066614111154905, 'mean_word_length': 2.851289833080425, 'pattern_counts': {'":': 0, '<': 26, '<?xml version=': 0, '>': 28, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7652064', 'n_tokens_mistral': 766, 'n_tokens_neox': 760, 'n_words': 155}