diff --git a/.gitattributes b/.gitattributes
index 02f92edb977fddc6393cd609b39b9b793cd58c36..91b3d7b6ccd4ccc58515eb8865d1476a1e1052c2 100644
--- a/.gitattributes
+++ b/.gitattributes
@@ -348,6 +348,7 @@ img_pack/soyezcreateurs_help-24.png -text
 img_pack/soyezcreateurs_help-48.png -text
 inc/sc_agenda.php -text
 inc/sc_article.php -text
+inc/titrer_document.php -text
 /inc_mots_article.html -text
 inclure/agenda_programmation.html -text
 inclure/agenda_programmation_fonctions.php -text
diff --git a/inc/titrer_document.php b/inc/titrer_document.php
new file mode 100644
index 0000000000000000000000000000000000000000..a57aaabd9b3e44ebc904e8342d2bd8f9ffb79dfc
--- /dev/null
+++ b/inc/titrer_document.php
@@ -0,0 +1,9 @@
+<?php
+if (!defined('_ECRIRE_INC_VERSION')) return;
+
+function inc_titrer_document_dist($titre) {
+	$titre = substr($titre, 0, strrpos($titre, '.')); // Enlever l'extension du nom du fichier
+	$titre = preg_replace(',[[:space:]]+,u', ' ', $titre);
+	$titre = safehtml($titre);
+	return $titre;
+}
\ No newline at end of file
diff --git a/soyezcreateurs_options.php b/soyezcreateurs_options.php
index 0edc650b8bf12471a7c59a70cf24f50981938918..fce9951c06529bfe21ff46de1b101c94257d1015 100644
--- a/soyezcreateurs_options.php
+++ b/soyezcreateurs_options.php
@@ -18,7 +18,7 @@ if (!defined('_ACCESSIBILITE_CONSERVER_BULLE'))
 if (!defined('_LARGEUR_MODE_IMAGE'))
 	define('_LARGEUR_MODE_IMAGE', 799); //  Voir http://permalink.gmane.org/gmane.comp.web.spip.zone/16461
 if (!defined('_TITRER_DOCUMENTS'))
-	define('_TITRER_DOCUMENTS', true); // Le titre des documents joints est automatiquement pris à partir du nom du fichier (avec mediatheque) ; Voir https://zone.spip.org/trac/spip-zone/changeset/41565
+	define('_TITRER_DOCUMENTS', true); // Le titre des documents joints est automatiquement pris à partir du nom du fichier (avec mediatheque) ; Voir https://zone.spip.org/trac/spip-zone/changeset/41565 et https://zone.spip.net/trac/spip-zone/changeset/108693
 if (!defined('_MOTS_CREATION_RETOUR_MOT_CREE'))
 	define('_MOTS_CREATION_RETOUR_MOT_CREE', true); // Revenir au mot clef nouvellement créé. Cf https://zone.spip.net/trac/spip-zone/changeset/110686/spip-zone
 if (!defined('_AGENDA_CHOIX_RUBRIQUE_OUVERT'))