Opened 8 years ago
Closed 8 years ago
#37086 closed defect (bug) (fixed)
Remove Middle Dot (U+00B7) from URL (for Catalan only?)
Reported by: | xavivars | Owned by: | ocean90 |
---|---|---|---|
Milestone: | 4.6 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Formatting | Keywords: | has-patch has-unit-tests commit |
Focuses: | Cc: |
Description (last modified by )
Currently, remove_accents() converts all characters to an ASCII equivalent so it looks "nice" as a URLs without the need of escaping characters (and, thus, showing % as part of the links).
However, the middle dot (U+00B7) is not removed. Middle dot is used in Catalan between two L (like this l·l).
Quoting from wikipedia:
The flown dot (Catalan: punt volat) is used in Catalan between two Ls in cases where each belongs to a separate syllable, for example cel·la, "cell". This distinguishes such "geminate Ls" (ela geminada), which are pronounced [ɫː], from "double L" (doble ela), which are written without the flown dot and are pronounced [ʎ].
On top of non being consistent (all other Catalan diacritics are removed), not removing this character has some side-effects, because there are some URL libraries that don't take it into account (like the one Twitter uses: see https://twitter.com/VilaWeb/status/738348674137399296).
My proposal is to remove that char when it appears between two l.
Attachments (5)
Change History (15)
#2
@
8 years ago
- Description modified (diff)
- Keywords needs-refresh needs-unit-tests added
- Milestone changed from Awaiting Review to Future Release
@xavivars Thanks for your patches. The replacement should only be done for Catalan. Removing the dots can maybe handled by sanitize_title_with_dashes()
.
Can you make sure that the patches are relative to the root directory? And there should be a unit test for this change in /tests/phpunit/tests/formatting/RemoveAccents.php
.
#3
@
8 years ago
@ocean90: should the patches be relative to the root directory of which repo? I've found contradictory information (sometimes pointing to develop.svn.wordpress.org and some other times pointing to core.svn).
I'll also add unit tests for that.
#4
@
8 years ago
develop.svn.wordpress.org (or develop.git.wordpress.org) would be the correct repository for patches.
#5
@
8 years ago
@ocean90: I don't think I agree the removal of those dots should be done at sanitize_title_with_dashes
. The middot it affects how the L are pronounced, and in fact, the first case was already covered in the same remove_accents
method (I've removed it from the new formating.php.patch
). However, if you think those changes belong better to sanitize_title_with_dashes
, I'm open to discuss about that.
#8
@
8 years ago
- Keywords commit added; dev-feedback removed
37086.patch combines the patch and the test and also updates the docs.
I think it's fine to handle this in remove_accents()
.
Removes middle dot when Catalan is set as a language