URL slug with question caracter at the begining

Hi!

I have created a blog with Vuepress and Netlify CMS. At the moment I have been able to solve all the details to customize the site largely thanks to your community :slight_smile:

This time I have a topic related to the sanitation of URLs. I don’t know how Netlify CMS manages it in detail but I’m afraid it must be related to the language used.

For example:

A post with a title in English:

Who is Scooby Doo?

The same post in Spanish:

¿Quién es Scooby Doo?

Netlify CMS will save the file with the slug:

In English:

who-is-scooby-doo.md
https://www.website.com/who-is-scooby-doo

In Spanish:

¿quien-es-scooby-doo.md
https://www.website.com/¿quien-es-scooby-doo

In the case of Spanish, it can be seen that it does not eliminate the interrogative character at the beginning of the post title, the same happens with the exclamatory character.

I am afraid this is because it is not configured to remove these characters in cases where it is found? Whether it is at the beginning of the sentence or inside it.

At this point I wonder if they know how I can solve this. Perhaps the language used can be indicated in Netlify CMS and in this way it sanitizes the URLs correctly.

The way it does now for the Spanish language is wrong.

Maybe @tomrutgers can help me :wink:

As always thank you very much.

Hi @dcodesys,

Have you looked at Slug Type in the docs (Configuration Options | Netlify CMS | Open-Source Content Management System ). It has options for both encoding (ascii or unicode) and sanitize_replacement).

Hope this helps.

3 Likes