#2735 closed defect (bug) (fixed)
GBP symbol (£) not removed from permalinks
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Milestone: | 2.0.6 | Priority: | normal |
| Severity: | minor | Version: | 2.0.2 |
| Component: | General | Keywords: | has-patch |
| Focuses: | Cc: |
Description
If a post title contains the symbol for the British pound sterling, £, it is not removed from the permalink URL as would be the case with most other punctuation. For example, if a post is published with the title "WordPress costs £0", the post title in the generated permalink would be "wordpress-costs-%c2%a30" instead of the expected "wordpress-costs-0".
Attachments (1)
Change History (15)
#2
@
20 years ago
It's a valid URL and works but it doesn't exactly look nice. Surely it's a bug when other symbols (including $ and €) get filtered but that doesn't?
#3
@
20 years ago
Cannot duplicate. Comes out as wordpress-costs-%c2%a30
How is your £ getting past this?
$title = preg_replace('/[^%a-z0-9 _-]/', '', $title);
Are you sure you're not using a plugin that does its own title filtering?
#4
@
20 years ago
Mark: That's exactly the result that he's getting. You DID duplicate it. :-) The point of the bug report was to have the GBP sign stripped just as we strip dollars and yen.
Neko: Okay, I agree with you. Let's strip it before url encoding. Can you patch it?
@
20 years ago
This should strip the pound symbol. I couldn't figure out where the $ symbol was being stripped so I put it in with the remove_accents() function.
#6
@
20 years ago
I'm stupid and I need to brush up on my regular expressions. In any case because the pound symbol is a double-byte unicode char, I guess it's best placed in there with remove_accents().
#9
@
20 years ago
The Euro symbol is converted to "E"
Should the GBP symbold be converted to an "L" ?
I think it looks like an "L," but I'm American, so I'd like an opinion from someone who actually uses the currency.
#10
@
20 years ago
- Owner changed from anonymous to markjaquith
- Status changed from new to assigned
Westi says "no" to converting to L, so I'm putting it in as it stands.
So what's the problem? Isn't that a valid URL? This looks like an expectation bug to me, but I've been known to err.