Index: export/views_bonus_export.module =================================================================== --- export/views_bonus_export.module (revision 493) +++ export/views_bonus_export.module (working copy) @@ -115,10 +115,14 @@ foreach ($vars['themed_rows'] as $num => $row) { foreach ($row as $field => $content) { - $vars['themed_rows'][$num][$field] = str_replace( - array('&', '<', '>'), - array('&', '<', '>'), + // Prevent double encoding of the ampersand. Look for the entities produced by check_plain(). + $content = preg_replace('/&(?!(amp|quot|#039|lt|gt);)/', '&', $content); + // Convert < and > to HTML entities. + $content = str_replace( + array('<', '>'), + array('<', '>'), $content); + $vars['themed_rows'][$num][$field] = $content; } } }