Skip to content

Incorrect deprecation notice for sanitize_url() #273

@ghost

Description

Describe the bug

This deprecation notice is incorrect:

sanitize_url() has been deprecated since WordPress version 2.8.0. Use esc_url_raw() instead.

According to the documentation it was restored (un-deprecated) in version 5.9.

https://developer.wordpress.org/reference/functions/sanitize_url/

In: DeprecatedFunctionsSniff.php

    'sanitize_url' => array(
        'alt'     => 'esc_url_raw()',
        'version' => '2.8.0',
    ),

Steps to Reproduce

  1. Run the checks on any plugin that contains the function sanitize_url()
  2. Error shown: WordPress.WP.DeprecatedFunctions.sanitize_urlFound

Screenshots, screen recording, code snippet

No response

Environment information

No response

WordPress information

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions