zillo32 / vosao

Automatically exported from code.google.com/p/vosao
GNU Lesser General Public License v2.1
0 stars 0 forks source link

Page url generation and validation: removal of accents #435

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Add a new page (Content->click on the "Add child" button of a page)
2. Type a title with non Ascii letters, e.g. "île exiguë"
3. Change the automatically generated to "île exiguë"

What is the expected output? What do you see instead?
After step 2, I would expect a "smarter" transformation, i.e. removing accents 
but leaving the letters; in the given example, I would expect "ile-exigue". 
Instead, I get characters not in [a-zA-Z\-_] replaced by '-'.
After step 3, I would expect an input validation, i.e. not letting a weird 
string such as "île exiguë" as page url. Instead, it is accepted as a url, 
and it will cause some encoding problems.

A good starting point for a smarter character translation could be the mapping 
of the ISO 8859-1 Characters ( see 
http://www.w3schools.com/tags/ref_entities.asp ). Further improvement could 
take further characters, such as Vietnamese, and an integration in the 
localization process, as other languages could be mapped differently than by 
just removing the accents. For example, German would map ß to ss, ä to ae, ö 
to oe and ü to ue.

For the second point, the creation of the page could be blocked as long as the 
url does not match a pattern.

Original issue reported on code.google.com by quentin....@gmail.com on 14 Feb 2011 at 8:56

GoogleCodeExporter commented 8 years ago
Mapping of the ISO 8859-1 Characters
ÀÁÂÃÄÅ->A
Æ->AE
Ç->C
ÈÉÊË->E
ÌÍÎÏ->I
Ð->Th
Ñ->N
ÒÓÔÕÖØ->O
ÙÚÛÜ->U
Ý->Y
Þ->Th
ß->ss
àáâãäå->a
æ->ae
ç->c
èéêë->e
ìíîï->i
ð->o
ñ->n
òóôõöø->o
ùúûü->u
ýÿ->y
þ->th

Original comment by quentin....@gmail.com on 14 Feb 2011 at 9:08

GoogleCodeExporter commented 8 years ago

Original comment by kinyelo@gmail.com on 14 Feb 2011 at 9:51

GoogleCodeExporter commented 8 years ago
This issue was closed by revision r1025.

Original comment by kinyelo@gmail.com on 3 Apr 2011 at 11:29