Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
Dirifying and quotes
I had been wondering if there was any purpose in adding different styles of quotes in i18n-ascii.txt (“ ” « » etc) and how these should be handled. So I tested it with «Εωράκαμεν τους ληστάς» (including the « » quotes) and got the following result for a permlink:
http://www.agitprop.gr/test/1/%E2eorkme-oys-lis-s%E2
where I would expect:
http://www.agitprop.gr/test/1/eorakamen-tous-listas
I decided to strect the test a little and add an extra single quote in the middle of the title: «Εωράκαμεν τ’ς ληστάς». Voila:
And the link had become: http://www.agitprop.gr/test/1/%E2eorkme-s-lis-s%E2
If you follow it, you get a strange “200OK” page telling you that the page has moved.
PS. I’d post in the “Bug Reports” section of the forum if I knew I’d get such results.
Last edited by Etz Haim (2005-12-02 11:46:53)
VC3 :: weblog :: my wishlist
Offline
#2 2005-08-24 09:38:09
- zem
- Developer Emeritus
- From: Melbourne, Australia
- Registered: 2004-04-08
- Posts: 2,579
Re: Dirifying and quotes
If you follow it, you get a strange “200OK” page telling you that the page has moved.
Are you by any chance using a redirect plugin?
Alex
Offline
Re: Dirifying and quotes
Etz,
Can you try setting “Permalink title format” to ‘no’ in advanced prefs?
text*
Offline
Re: Dirifying and quotes
> zem wrote:
> Are you by any chance using a redirect plugin?
Yes, indeed, I was using zem_redirect, and as soon as I had turned it off, the problem stopped. I’ve also tried Dean’s suggestion with both zem_redirect enabled and disabled, but it didn’t seem to have any effect.
Thank you both for helping me solve this. And to return to my original question, how should quotes be handled in URL titles?
VC3 :: weblog :: my wishlist
Offline
#5 2005-08-25 01:13:18
- zem
- Developer Emeritus
- From: Melbourne, Australia
- Registered: 2004-04-08
- Posts: 2,579
Re: Dirifying and quotes
how should quotes be handled in URL titles?
They ought to be either stripped or converted to dashes. The exact behaviour seems to be system-dependent, so there might be a regexp/utf8 problem.
Alex
Offline
Re: Dirifying and quotes
I’d rather have the quotes striped than converted to dashes. Also, when it comes to the i18n-ascii.txt, if we choose to use this for “international” quotes, how should they be described in the file? From a semantic aspect, I’d prefer
« = <code>”</code>
to
« =
and then, at a second pass, use another function to strip the quotes.
Last edited by Etz Haim (2005-08-25 01:45:55)
VC3 :: weblog :: my wishlist
Offline
#7 2005-08-25 11:06:49
- zem
- Developer Emeritus
- From: Melbourne, Australia
- Registered: 2004-04-08
- Posts: 2,579
Re: Dirifying and quotes
There are two separate things going on here.
Stripping out quotes and other non-word characters is the job of stripSpace(). It works fine under normal circumstances, but in this case it was being masked by problems elsewhere.
Transliteration is handled by dumbDown() and i18n-ascii.txt. We finally tracked down the problem to a quirk of parse_ini_file(), the function that loads that file – it’s messing up a few characters.
We should have a fix for 4.0.1.
Alex
Offline
#8 2005-08-25 11:38:05
- zem
- Developer Emeritus
- From: Melbourne, Australia
- Registered: 2004-04-08
- Posts: 2,579
Re: Dirifying and quotes
We should have a fix for 4.0.1.
Give r837 a try. The txt file seems to be missing a couple of Greek characters, but other than those it’s about right.
Alex
Offline
Re: Dirifying and quotes
> zem wrote:
> Give r837 a try. The txt file seems to be missing a couple of Greek characters, but other than those it’s about right.
Missing characters? You mean the extended Greek set (aka polytonic) used for ancient and biblical Greek? We’re about to add these too.
VC3 :: weblog :: my wishlist
Offline
Re: Dirifying and quotes
There’s a visible improvement, but different types of quotes (« » “ ”) are converted to some non-UTF8 characters in the URL. See for yourself the test page for it (the “lorem ipsum”), and how it doesn’t validate.
Update: That was revision 839, revision 840 fixed it completely. Thanks, guys.
PS. Want to wait a little bit for polytonic support to be ready to be included in 4.0.1 ??? This would make Textpattern the first CMS to support it.
Last edited by Etz Haim (2005-08-25 13:42:01)
VC3 :: weblog :: my wishlist
Offline
Pages: 1