We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Espaces insécables dans le titre de mise en Une
**Description du bug**

Espace non insécable dans l'aperçu de mis en Une. Ce problème n'a pas pu être par #5292 car l'aperçu est généré par du JavaScript.

**Comment reproduire ?**

La liste des étapes qui permet de reproduire le bug :

1. Se connecter en tant qu'administrateur ;
2. Accéder à la page d'un contenu ;
3. Mettre ce contenu en Une ;
4. Mettre le titre suivant : « `Comment alerter les secours ?` ».

**Comportement attendu**

L'espace doit automatiquement être remplacé par un espace insécable, avant ou après les signes concernés.

--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `zds/utils/templatetags/french_typography.py`
Content:
```
1 from django import template
2 from django.template.defaultfilters import stringfilter
3 from django.utils.safestring import mark_safe
4 
5 register = template.Library()
6 
7 
8 @register.filter()
9 @stringfilter
10 def french_typography(str):
11     """
12     Replaces spaces with non-breaking-spaces or narrow non-breaking-spaces
13     before or after some symbols, according to French typography.
14 
15     This filter is naive and should not be used on Markdown content.
16     """
17     return mark_safe(
18         # Narrow non-breaking space: &#8239;
19         str.replace(' ;', '&#8239;;')
20            .replace(' ?', '&#8239;?')
21            .replace(' !', '&#8239;!')
22            .replace(' %', '&#8239;%')
23         # Non-breaking space: &nbsp;
24            .replace('« ', '«&nbsp;')
25            .replace(' »', '&nbsp;»')
26            .replace(' :', '&nbsp;:')
27     )
28
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/zds/utils/templatetags/french_typography.py b/zds/utils/templatetags/french_typography.py
--- a/zds/utils/templatetags/french_typography.py
+++ b/zds/utils/templatetags/french_typography.py
@@ -13,6 +13,9 @@
     before or after some symbols, according to French typography.
 
     This filter is naive and should not be used on Markdown content.
+
+
+    Any change here should also be made in assets/js/featured-resource-preview.js
     """
     return mark_safe(
         # Narrow non-breaking space: &#8239;

{"golden_diff": "diff --git a/zds/utils/templatetags/french_typography.py b/zds/utils/templatetags/french_typography.py\n--- a/zds/utils/templatetags/french_typography.py\n+++ b/zds/utils/templatetags/french_typography.py\n@@ -13,6 +13,9 @@\n     before or after some symbols, according to French typography.\n \n     This filter is naive and should not be used on Markdown content.\n+\n+\n+    Any change here should also be made in assets/js/featured-resource-preview.js\n     \"\"\"\n     return mark_safe(\n         # Narrow non-breaking space: &#8239;\n", "issue": "Espaces ins\u00e9cables dans le titre de mise en Une\n**Description du bug**\r\n\r\nEspace non ins\u00e9cable dans l'aper\u00e7u de mis en Une. Ce probl\u00e8me n'a pas pu \u00eatre par #5292 car l'aper\u00e7u est g\u00e9n\u00e9r\u00e9 par du JavaScript.\r\n\r\n**Comment reproduire ?**\r\n\r\nLa liste des \u00e9tapes qui permet de reproduire le bug :\r\n\r\n1. Se connecter en tant qu'administrateur\u00a0;\r\n2. Acc\u00e9der \u00e0 la page d'un contenu\u00a0;\r\n3. Mettre ce contenu en Une\u00a0;\r\n4. Mettre le titre suivant\u00a0: \u00ab\u00a0`Comment alerter les secours ?` \u00bb.\r\n\r\n**Comportement attendu**\r\n\r\nL'espace doit automatiquement \u00eatre remplac\u00e9 par un espace ins\u00e9cable, avant ou apr\u00e8s les signes concern\u00e9s.\n", "before_files": [{"content": "from django import template\nfrom django.template.defaultfilters import stringfilter\nfrom django.utils.safestring import mark_safe\n\nregister = template.Library()\n\n\n@register.filter()\n@stringfilter\ndef french_typography(str):\n    \"\"\"\n    Replaces spaces with non-breaking-spaces or narrow non-breaking-spaces\n    before or after some symbols, according to French typography.\n\n    This filter is naive and should not be used on Markdown content.\n    \"\"\"\n    return mark_safe(\n        # Narrow non-breaking space: &#8239;\n        str.replace(' ;', '&#8239;;')\n           .replace(' ?', '&#8239;?')\n           .replace(' !', '&#8239;!')\n           .replace(' %', '&#8239;%')\n        # Non-breaking space: &nbsp;\n           .replace('\u00ab ', '\u00ab&nbsp;')\n           .replace(' \u00bb', '&nbsp;\u00bb')\n           .replace(' :', '&nbsp;:')\n    )\n", "path": "zds/utils/templatetags/french_typography.py"}], "after_files": [{"content": "from django import template\nfrom django.template.defaultfilters import stringfilter\nfrom django.utils.safestring import mark_safe\n\nregister = template.Library()\n\n\n@register.filter()\n@stringfilter\ndef french_typography(str):\n    \"\"\"\n    Replaces spaces with non-breaking-spaces or narrow non-breaking-spaces\n    before or after some symbols, according to French typography.\n\n    This filter is naive and should not be used on Markdown content.\n\n\n    Any change here should also be made in assets/js/featured-resource-preview.js\n    \"\"\"\n    return mark_safe(\n        # Narrow non-breaking space: &#8239;\n        str.replace(' ;', '&#8239;;')\n           .replace(' ?', '&#8239;?')\n           .replace(' !', '&#8239;!')\n           .replace(' %', '&#8239;%')\n        # Non-breaking space: &nbsp;\n           .replace('\u00ab ', '\u00ab&nbsp;')\n           .replace(' \u00bb', '&nbsp;\u00bb')\n           .replace(' :', '&nbsp;:')\n    )\n", "path": "zds/utils/templatetags/french_typography.py"}]}