<commit_before>import DOMPurify from 'dompurify';
import React from 'react';

export const FormattedHtml: React.FC<{ html: string }> = (props) => {
  const html = React.useMemo(() => DOMPurify.sanitize(props.html), [
    props.html,
  ]);
  return <div dangerouslySetInnerHTML={{ __html: html }} />;
};<commit_msg>Fixed '<div> cannot appear as a child of <p>' in ShoppingCartItem component<commit_after>import DOMPurify from 'dompurify';
import React from 'react';

export const FormattedHtml: React.FC<{ html: string }> = (props) => {
  const html = React.useMemo(() => DOMPurify.sanitize(props.html), [
    props.html,
  ]);
  return <span dangerouslySetInnerHTML={{ __html: html }} />;
};
{'fraction_non_alphanumeric': 0.15918958031837915, 'fraction_numerical': 0.0, 'mean_word_length': 4.9655172413793105, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 13, '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': '5294435', 'n_tokens_mistral': 227, 'n_tokens_neox': 226, 'n_words': 62}