Opened 15 years ago
Closed 14 years ago
#19820 closed defect (bug) (fixed)
More post slug cleaning
| Reported by: | honza.skypala | Owned by: | nacin |
|---|---|---|---|
| Priority: | normal | Milestone: | 3.4 |
| Component: | Formatting | Version: | 3.3.1 |
| Severity: | normal | Keywords: | has-patch commit |
| Cc: | Focuses: |
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
@
15 years ago
- Component General → Formatting
- Keywords has-patch needs-unit-tests added
- Milestone Awaiting Review → 3.4
#2
follow-up:
↓ 3
@
15 years ago
- Cc 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
@
15 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
@
15 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
@
15 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
@
15 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.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
19820.patch adds the remaining quotation marks and
×sign to the replacement list.