Opened 13 years ago
Closed 13 years ago
#19820 closed defect (bug) (fixed)
More post slug cleaning
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 3.4 | Priority: | normal |
Severity: | normal | Version: | 3.3.1 |
Component: | Formatting | Keywords: | has-patch commit |
Focuses: | Cc: |
Description
Hi there,
removing a number of funky characters from post slugs in WP 3.3 is a great improvement, I suggest two more characters:
- „ (lower curly quotes, used by some european languages) - remove from slug
- × (multiplay sign) - substitute with letter x
Thx. Take care,
Honza
Attachments (4)
Change History (14)
#1
@
13 years ago
- Component changed from General to Formatting
- Keywords has-patch needs-unit-tests added
- Milestone changed from Awaiting Review to 3.4
#2
follow-up:
↓ 3
@
13 years ago
- Cc kpayne@… added
- Keywords needs-unit-tests removed
19820.2.patch fixes this test case:
$this->assertEquals("one-two", sanitize_title_with_dashes("One & Two;", '', 'save'));
Output was:
There was 1 failure: 1) TestSanitizeTitleWithDashes::test_strips_entities Failed asserting that two strings are equal. --- Expected +++ Actual @@ @@ -'one-two' +'one'
This change is unrelated to SergeyBiryukov's patch, but is related to the request for unit tests.
SergeyBiryukov's patch looks good.
#3
in reply to:
↑ 2
@
13 years ago
Replying to kurtpayne:
19820.2.patch fixes this test case:
$this->assertEquals("one-two", sanitize_title_with_dashes("One & Two;", '', 'save'));
This test case doesn't fail anymore, seems to be fixed elsewhere.
Committed unit tests: [UT688]
#4
@
13 years ago
The test is marked as skipped against #10823.
php wp-test.php -p -f -t TestSanitizeTitleWithDashes .......F...... Time: 1 second, Memory: 66.75Mb There was 1 failure: 1) TestSanitizeTitleWithDashes::test_strips_entities Failed asserting that two strings are equal. --- Expected +++ Actual @@ @@ -'one-two' +'one' /Users/nacin/Sites/tests/wp-testcase/test_includes_formatting.php:1031 /Users/nacin/Sites/tests/wp-testlib/base.php:604 /Users/nacin/Sites/tests/wp-test.php:209
#5
follow-ups:
↓ 6
↓ 7
@
13 years ago
Is the change from . to \S intentional/necessary? We have found that \s (and therefore I imagine \S) incorrectly targets some letters in other languages or elsewhere in UTF8. A good example to test for is the Hebrew letter nun.
#7
in reply to:
↑ 5
@
13 years ago
Replying to nacin:
Is the change from . to \S intentional/necessary? We have found that \s (and therefore I imagine \S) incorrectly targets some letters in other languages or elsewhere in UTF8. A good example to test for is the Hebrew letter nun.
It was intentional at the time (I didn't know about #10823). A patch for ampersand handling belongs in #10823, though.
19820.patch adds the remaining quotation marks and
×
sign to the replacement list.