Opened 12 years ago
Closed 11 years ago
#26199 closed enhancement (fixed)
Pass original value to sanitize_option_* filter
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Milestone: | 4.3 | Priority: | normal |
| Severity: | normal | Version: | 3.2 |
| Component: | Options, Meta APIs | Keywords: | has-patch |
| Focuses: | Cc: |
Description
Currently the sanitize_option_{$option_name} filter differs from other esc and sanitization filters in that it does not pass the original value. It should.
Attachments (4)
Change History (10)
#2
@
12 years ago
I've refreshed the patch:
- The intended effect still works (original value passed as a third parameter)
- Four unit tests fail, see below, but these appear unrelated
1) Tests_Formatting_WPTexturize::test_quotes Failed asserting that two strings are equal. --- Expected +++ Actual @@ @@ -'Here is “<a href="http://example.com">a test with a link</a>”' +'Here is “<a href="http://example.com">a test with a link</a>“' /srv/www/wordpress-develop/tests/phpunit/tests/formatting/WPTexturize.php:84 2) Tests_Formatting_WPTexturize::test_quotes_before_numbers Failed asserting that two strings are equal. --- Expected +++ Actual @@ @@ -'Class of ’99’s' +'Class of ‘99’s' /srv/www/wordpress-develop/tests/phpunit/tests/formatting/WPTexturize.php:114 3) Tests_Formatting_WPTexturize::test_other_html Failed asserting that two strings are equal. --- Expected +++ Actual @@ @@ -'‘<strong>Quoted Text</strong>’,' +'‘<strong>Quoted Text</strong>‘,' /srv/www/wordpress-develop/tests/phpunit/tests/formatting/WPTexturize.php:132 4) Tests_Formatting_WPTexturize::test_entity_quote_cuddling Failed asserting that two strings are equal. --- Expected +++ Actual @@ @@ -'&“Testing”' +'&”Testing”' /srv/www/wordpress-develop/tests/phpunit/tests/formatting/WPTexturize.php:176
#3
@
11 years ago
- Keywords 3.9-early removed
- Owner set to chriscct7
- Severity changed from minor to normal
- Status changed from new to reviewing
- Version changed from 3.2.1 to 3.2
Note: See
TracTickets for help on using
tickets.
Adds the original value to the sanitize_option_* filter (now without my dirty test which breaks TwentyThirteen)