<commit_before>"use strict";

import React from "react";
import { Row, OverlayMixin, Modal } from "react-bootstrap";
import $ from "jquery";
import _ from "lodash";


export default React.createClass({
  displayName: "News",
  mixins: [OverlayMixin],

  getInitialState() {
    return {
      isModalOpen: false
    };
  },

  openModal() {
    this.setState({
      isModalOpen: true
    });
  },

  closeModal() {
    this.setState({
      isModalOpen: false
    });
  },

  render() {
    let date = new Date(this.props.created_at).toLocaleDateString();

    let read_more = null;
    if (this.props.body) {
      read_more = <a className="link link-secondary"
                     onClick={this.openModal}>
                    mai mult
                  </a>;
    }

    return <div>
      <Row className="xsmall-spacing" />
      <Row>
        <p className="date">{date}</p>
        <p className="title">{this.props.title}</p>
        <p className="message">{this.props.short_description} {read_more}</p>
      </Row>
    </div>;
  },

  renderOverlay() {
    if (!this.state.isModalOpen) {
      return null;
    }

    return (
      <Modal animation={true}
             bsStyle="primary"
             onRequestHide={this.closeModal}
             title={this.props.title}>
        <div className="modal-body">
          {this.props.body}
        </div>
      </Modal>
    );
  }
});<commit_msg>Load unsafe html. #140<commit_after>"use strict";

import React from "react";
import { Row, OverlayMixin, Modal } from "react-bootstrap";
import $ from "jquery";
import _ from "lodash";


export default React.createClass({
  displayName: "News",
  mixins: [OverlayMixin],

  getInitialState() {
    return {
      isModalOpen: false
    };
  },

  openModal() {
    this.setState({
      isModalOpen: true
    });
  },

  closeModal() {
    this.setState({
      isModalOpen: false
    });
  },

  render() {
    let date = new Date(this.props.created_at).toLocaleDateString();

    let read_more = null;
    if (this.props.body) {
      read_more = <a className="link link-secondary"
                     onClick={this.openModal}>
                    mai mult
                  </a>;
    }

    return <div>
      <Row className="xsmall-spacing" />
      <Row>
        <p className="date">{date}</p>
        <p className="title">{this.props.title}</p>
        <p className="message">{this.props.short} {read_more}</p>
      </Row>
    </div>;
  },

  renderOverlay() {
    if (!this.state.isModalOpen) {
      return null;
    }

    return (
      <Modal animation={true}
             bsStyle="primary"
             onRequestHide={this.closeModal}
             title={this.props.title}>
        <div className="modal-body" dangerouslySetInnerHTML={{__html: this.props.body}} />
      </Modal>
    );
  }
});
{'fraction_non_alphanumeric': 0.15088967971530248, 'fraction_numerical': 0.0010676156583629894, 'mean_word_length': 2.1442953020134228, 'pattern_counts': {'":': 0, '<': 36, '<?xml version=': 0, '>': 36, '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': '1662781', 'n_tokens_mistral': 898, 'n_tokens_neox': 878, 'n_words': 173}