[wp-trac] [WordPress Trac] #25021: Improve sanitize_title_with_dashes % removal
WordPress Trac
noreply at wordpress.org
Mon Jun 23 16:55:12 UTC 2025
#25021: Improve sanitize_title_with_dashes % removal
----------------------------------------------------+---------------------
Reporter: duck_ | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone:
Component: Formatting | Version: 1.5
Severity: normal | Resolution:
Keywords: has-patch has-unit-tests has-test-info | Focuses:
----------------------------------------------------+---------------------
Comment (by lakshyajeet):
== Test Report
=== Description
This report validates whether the indicated patch works as expected.
Patch tested: https://github.com/WordPress/wordpress-develop/pull/9011
=== Environment
- WordPress: 6.9-alpha-60093-src
- PHP: 8.2.28
- Server: nginx/1.27.5
- Database: mysqli (Server: 8.4.5 / Client: mysqlnd 8.2.28)
- Browser: Chrome 136.0.0.0
- OS: macOS
- Theme: Twenty Nineteen 3.1
- MU Plugins: None activated
- Plugins:
* Test Reports 1.2.0
=== Testing instructions
- Apply the patch.
- Use Shortcode to display the text (sample code below).
- Add shortcode in a post: `[sanitize_title_shortcode]`
- Text displayed `%abc`
=== Expected Results
- The text `abc` should be displayed.
=== Actual Results
- The text `abc` is displayed.
- ✅ Issue resolved with patch.
=== Supplemental Artifacts
Code used:
{{{#!php
function sanitize_title_with_dashes_shortcode_test() {
$title = '---abc---';
$sanitized_title = sanitize_title_with_dashes( $title );
return $sanitized_title;
}
add_shortcode( 'sanitize_title_shortcode',
'sanitize_title_with_dashes_shortcode_test' );
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/25021#comment:10>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list