<commit_before>import React from "react";
import PropTypes from "prop-types";

export default class MailContent extends React.Component {

    componentDidMount() {
        this.updateContent(this.props.html);
    }

    componentWillReceiveProps(nextProps) {
        if(this.props.html !== nextProps.html){
            this.updateContent(nextProps.html);
        }
    }

    handleIframeOnLoad(){
        // this handler is only necessary because of firefox which seems to set a default content with a delay.
        
        // overwrite the default content
        this.updateContent(this.props.html);
    }
    
    updateContent(html){
      

        const { iframe } = this;
        if (iframe && iframe.contentDocument.body.innerHTML !== html) {
            iframe.contentDocument.body.innerHTML = html;
            console.log("iframe", iframe.contentDocument)<commit_msg>removed console.log<commit_after>import React from "react";
import PropTypes from "prop-types";

export default class MailContent extends React.Component {

    componentDidMount() {
        this.updateContent(this.props.html);
    }

    componentWillReceiveProps(nextProps) {
        if(this.props.html !== nextProps.html){
            this.updateContent(nextProps.html);
        }
    }

    handleIframeOnLoad(){
        // this handler is only necessary because of firefox which seems to set a default content with a delay.
        
        // overwrite the default content
        this.updateContent(this.props.html);
    }
    
    updateContent(html){
      

        const { iframe } = this;
        if (iframe && iframe.contentDocument.body.innerHTML !== html) {
            iframe.contentDocument.body.innerHTML = html;
{'fraction_non_alphanumeric': 0.0969626168224299, 'fraction_numerical': 0.0, 'mean_word_length': 2.488798370672098, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '7231627', 'n_tokens_mistral': 464, 'n_tokens_neox': 439, 'n_words': 110}