I had the same problem and was able to fix it by updating one of the Divi files.
I noticed in Firefox we were getting these errors “preg_replace_callback(): Requires argument 2, ‘_et_pb_sanitize_code_module_content_regex’, to be a valid callback in wp-content/themes/Divi/includes/builder/core.php Line 703”
After looking at preg_replace_callback() examples it looked like it was looking for a function and not a string. I found the line that it was complaining about and then searched for a function by that name in wp-content/themes/Divi/includes/builder/functions.php.
I then replaced the string with the function and it started working correctly.
Original code:
$content = preg_replace_callback(‘/\[et_pb_code .*\](.*)\[\/et_pb_code\]/mis’, ‘_et_pb_sanitize_code_module_content_regex’, $content );
$content = preg_replace_callback(‘/\[et_pb_fullwidth_code .*\](.*)\[\/et_pb_fullwidth_code\]/mis’, ‘_et_pb_sanitize_code_module_content_regex’, $content );
Updated code:
$content = preg_replace_callback(‘/\[et_pb_code .*\](.*)\[\/et_pb_code\]/mis’, function ( $matches ) {$sanitized_content = wp_kses_post( htmlspecialchars_decode( $matches[1] ) ); $sanitized_shortcode = str_replace( $matches[1], $sanitized_content, $matches[0] ); return $sanitized_shortcode;}, $content );
$content = preg_replace_callback(‘/\[et_pb_fullwidth_code .*\](.*)\[\/et_pb_fullwidth_code\]/mis’, function ( $matches ) {$sanitized_content = wp_kses_post( htmlspecialchars_decode( $matches[1] ) ); $sanitized_shortcode = str_replace( $matches[1], $sanitized_content, $matches[0] ); return $sanitized_shortcode;}, $content );