Problem with WordPress output text (‘esc_html’ & ‘wp_richedit_pre’)

Assuming that $_product->details contains what can be referred to as post content, and contains HTML, and you want to have that HTML rendered by the browser then you’re doing it wrong.

Please refer to the esc_html function and play around with it in a sandbox – you will soon find out that what the function does (just like the Codex says) is it escapes the HTML, i.e. transforms any special symbols to HTML entities, so these symbols are rendered as symbols and are not interpreted by your browser.

echo esc_html('<b>a string</b>'); // Produces &lt;b&gt;a string&lt;/b&gt;
echo '<b>a string</b>'; // Produces <b>a string</b>

So the short answer to your problem appears to be – remove the esc_html function from around the output.