Skip to content

[Blog] Blog url special character formatting #54

Description

@liviopersonne

Describe the bug
Some characters are badly formatted in the URLs of blog posts.
For example:

Title: Systèmes embarqués : Quand la technique s’adapte à l’usage
Url: .../systmes-embarqus-quand-la-technique-sadapte-lusage

We can see that "é" and "è" characters are deleted

Expected behavior
"é" and "è" characters should be formatted to "e"

Additional context
I already did this formatting in a google script:

var sanitizedName = name.toLowerCase().normalize("NFD").replace(/[\u0300-\u036f]/g, "")

Someone on stack overflow did this in C#:

string accentedStr;
byte[] tempBytes;
tempBytes = System.Text.Encoding.GetEncoding("ISO-8859-8").GetBytes(accentedStr);
string asciiStr = System.Text.Encoding.UTF8.GetString(tempBytes);

More info on Unicode normalization here

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinggood first issueGood for newcomers

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions