Index: wp-includes/post.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- wp-includes/post.php	(date 1613232100442)
+++ wp-includes/post.php	(date 1613232100442)
@@ -2386,6 +2386,7 @@
  * @return mixed Sanitized value.
  */
 function sanitize_post_field( $field, $value, $post_id, $context = 'display' ) {
+
 	$int_fields = array( 'ID', 'post_parent', 'menu_order' );
 	if ( in_array( $field, $int_fields, true ) ) {
 		$value = (int) $value;
@@ -2398,16 +2399,24 @@
 		return $value;
 	}
 
-	if ( 'raw' === $context ) {
-		return $value;
-	}
-
 	$prefixed = false;
 	if ( false !== strpos( $field, 'post_' ) ) {
 		$prefixed        = true;
 		$field_no_prefix = str_replace( 'post_', '', $field );
 	}
 
+	if ( 'raw' === $context ) {
+
+		if( ! $prefixed ){
+			$field = "post_{$field}";
+		}
+
+		/** This filter is documented in wp-includes/post.php */
+		$value = apply_filters( "{$field}", $value, $post_id, $context );
+
+		return $value;
+	}
+
 	if ( 'edit' === $context ) {
 		$format_to_edit = array( 'post_content', 'post_excerpt', 'post_title', 'post_password' );
 
