diff --git a/src/wp-includes/formatting.php b/src/wp-includes/formatting.php
index 06e0f26aae..37430aa517 100644
--- a/src/wp-includes/formatting.php
+++ b/src/wp-includes/formatting.php
@@ -4462,15 +4462,15 @@ function esc_url( $url, $protocols = null, $_context = 'display' ) {
  *
  * @since 2.8.0
  *
- * @see esc_url()
+ * @see sanitize_url()
  *
  * @param string   $url       The URL to be cleaned.
  * @param string[] $protocols Optional. An array of acceptable protocols.
  *                            Defaults to return value of wp_allowed_protocols().
- * @return string The cleaned URL after esc_url() is run with the 'db' context.
+ * @return string The cleaned URL after sanitize_url() is run with the 'db' context.
  */
 function esc_url_raw( $url, $protocols = null ) {
-	return esc_url( $url, $protocols, 'db' );
+	return sanitize_url( $url, $protocols );
 }
 
 /**
@@ -4482,7 +4482,7 @@ function esc_url_raw( $url, $protocols = null ) {
  * @since 2.8.0 Deprecated in favor of esc_url_raw().
  * @since 5.9.0 Restored (un-deprecated).
  *
- * @see esc_url_raw()
+ * @see esc_url()
  *
  * @param string   $url       The URL to be cleaned.
  * @param string[] $protocols Optional. An array of acceptable protocols.
@@ -4490,7 +4490,7 @@ function esc_url_raw( $url, $protocols = null ) {
  * @return string The cleaned URL after esc_url() is run with the 'db' context.
  */
 function sanitize_url( $url, $protocols = null ) {
-	return esc_url_raw( $url, $protocols );
+	return esc_url( $url, $protocols, 'db' );
 }
 
 /**
