aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--application/bookmark/LinkUtils.php11
-rw-r--r--application/formatter/BookmarkDefaultFormatter.php7
-rw-r--r--application/front/controller/admin/ShaareManageController.php4
-rw-r--r--assets/default/js/base.js3
-rw-r--r--doc/md/Shaarli-configuration.md16
-rw-r--r--inc/languages/fr/LC_MESSAGES/shaarli.po97
-rw-r--r--tests/formatter/BookmarkDefaultFormatterTest.php20
-rw-r--r--tests/front/controller/admin/ShaareManageControllerTest/DeleteBookmarkTest.php6
-rw-r--r--tpl/default/changetag.html3
-rw-r--r--tpl/default/page.footer.html5
10 files changed, 116 insertions, 56 deletions
diff --git a/application/bookmark/LinkUtils.php b/application/bookmark/LinkUtils.php
index faf5dbfd..17c37979 100644
--- a/application/bookmark/LinkUtils.php
+++ b/application/bookmark/LinkUtils.php
@@ -138,12 +138,17 @@ function space2nbsp($text)
138 * 138 *
139 * @param string $description shaare's description. 139 * @param string $description shaare's description.
140 * @param string $indexUrl URL to Shaarli's index. 140 * @param string $indexUrl URL to Shaarli's index.
141 141 * @param bool $autolink Turn on/off automatic linkifications of URLs and hashtags
142 *
142 * @return string formatted description. 143 * @return string formatted description.
143 */ 144 */
144function format_description($description, $indexUrl = '') 145function format_description($description, $indexUrl = '', $autolink = true)
145{ 146{
146 return nl2br(space2nbsp(hashtag_autolink(text2clickable($description), $indexUrl))); 147 if ($autolink) {
148 $description = hashtag_autolink(text2clickable($description), $indexUrl);
149 }
150
151 return nl2br(space2nbsp($description));
147} 152}
148 153
149/** 154/**
diff --git a/application/formatter/BookmarkDefaultFormatter.php b/application/formatter/BookmarkDefaultFormatter.php
index d58a5e39..149a3eb9 100644
--- a/application/formatter/BookmarkDefaultFormatter.php
+++ b/application/formatter/BookmarkDefaultFormatter.php
@@ -46,8 +46,13 @@ class BookmarkDefaultFormatter extends BookmarkFormatter
46 $bookmark->getDescription() ?? '', 46 $bookmark->getDescription() ?? '',
47 $bookmark->getAdditionalContentEntry('search_highlight')['description'] ?? [] 47 $bookmark->getAdditionalContentEntry('search_highlight')['description'] ?? []
48 ); 48 );
49 $description = format_description(
50 escape($description),
51 $indexUrl,
52 $this->conf->get('formatter_settings.autolink', true)
53 );
49 54
50 return $this->replaceTokens(format_description(escape($description), $indexUrl)); 55 return $this->replaceTokens($description);
51 } 56 }
52 57
53 /** 58 /**
diff --git a/application/front/controller/admin/ShaareManageController.php b/application/front/controller/admin/ShaareManageController.php
index 7ceb8d8a..2ed298f5 100644
--- a/application/front/controller/admin/ShaareManageController.php
+++ b/application/front/controller/admin/ShaareManageController.php
@@ -66,8 +66,8 @@ class ShaareManageController extends ShaarliAdminController
66 return $response->write('<script>self.close();</script>'); 66 return $response->write('<script>self.close();</script>');
67 } 67 }
68 68
69 // Don't redirect to where we were previously because the datastore has changed. 69 // Don't redirect to permalink after deletion.
70 return $this->redirect($response, '/'); 70 return $this->redirectFromReferer($request, $response, ['shaare/']);
71 } 71 }
72 72
73 /** 73 /**
diff --git a/assets/default/js/base.js b/assets/default/js/base.js
index 4163577d..66badfb2 100644
--- a/assets/default/js/base.js
+++ b/assets/default/js/base.js
@@ -294,7 +294,8 @@ function init(description) {
294 const deleteLinks = document.querySelectorAll('.confirm-delete'); 294 const deleteLinks = document.querySelectorAll('.confirm-delete');
295 [...deleteLinks].forEach((deleteLink) => { 295 [...deleteLinks].forEach((deleteLink) => {
296 deleteLink.addEventListener('click', (event) => { 296 deleteLink.addEventListener('click', (event) => {
297 if (!confirm(document.getElementById('translation-delete-tag').innerHTML)) { 297 const type = event.currentTarget.getAttribute('data-type') || 'link';
298 if (!confirm(document.getElementById(`translation-delete-${type}`).innerHTML)) {
298 event.preventDefault(); 299 event.preventDefault();
299 } 300 }
300 }); 301 });
diff --git a/doc/md/Shaarli-configuration.md b/doc/md/Shaarli-configuration.md
index dbfc3da9..99084728 100644
--- a/doc/md/Shaarli-configuration.md
+++ b/doc/md/Shaarli-configuration.md
@@ -164,6 +164,22 @@ _These settings should not be edited_
164- **trusted_proxies**: List of trusted IP which won't be banned after failed login attemps. Useful if Shaarli is behind a reverse proxy. 164- **trusted_proxies**: List of trusted IP which won't be banned after failed login attemps. Useful if Shaarli is behind a reverse proxy.
165- **allowed_protocols**: List of allowed protocols in shaare URLs or markdown-rendered descriptions. Useful if you want to store `javascript:` links (bookmarklets) in Shaarli (default: `["ftp", "ftps", "magnet"]`). 165- **allowed_protocols**: List of allowed protocols in shaare URLs or markdown-rendered descriptions. Useful if you want to store `javascript:` links (bookmarklets) in Shaarli (default: `["ftp", "ftps", "magnet"]`).
166 166
167### Formatter
168
169Single string value. Default available:
170
171 - `default`: supports line breaks, URL and hashtag auto-links.
172 - `markdown`: supports [Markdown](https://daringfireball.net/projects/markdown/syntax).
173 - `markdownExtra`: adds [extra](https://michelf.ca/projects/php-markdown/extra/) flavor to Markdown.
174
175### Formatter Settings
176
177Additional settings applied to formatters.
178
179#### default
180
181 - **autolink**: boolean to enable or disable automatic linkification of URL and hashtags.
182
167### Resources 183### Resources
168 184
169- **data_dir**: Data directory. 185- **data_dir**: Data directory.
diff --git a/inc/languages/fr/LC_MESSAGES/shaarli.po b/inc/languages/fr/LC_MESSAGES/shaarli.po
index 60ea7a97..4c363fa8 100644
--- a/inc/languages/fr/LC_MESSAGES/shaarli.po
+++ b/inc/languages/fr/LC_MESSAGES/shaarli.po
@@ -1,8 +1,8 @@
1msgid "" 1msgid ""
2msgstr "" 2msgstr ""
3"Project-Id-Version: Shaarli\n" 3"Project-Id-Version: Shaarli\n"
4"POT-Creation-Date: 2020-10-27 19:44+0100\n" 4"POT-Creation-Date: 2020-11-05 16:47+0100\n"
5"PO-Revision-Date: 2020-10-27 19:44+0100\n" 5"PO-Revision-Date: 2020-11-05 16:48+0100\n"
6"Last-Translator: \n" 6"Last-Translator: \n"
7"Language-Team: Shaarli\n" 7"Language-Team: Shaarli\n"
8"Language: fr_FR\n" 8"Language: fr_FR\n"
@@ -189,9 +189,9 @@ msgstr ""
189#: application/bookmark/BookmarkInitializer.php:91 189#: application/bookmark/BookmarkInitializer.php:91
190#: application/legacy/LegacyLinkDB.php:246 190#: application/legacy/LegacyLinkDB.php:246
191#: tmp/page.footer.b91ef64efc3688266305ea9b42e5017e.rtpl.php:15 191#: tmp/page.footer.b91ef64efc3688266305ea9b42e5017e.rtpl.php:15
192#: tmp/page.footer.b91ef64efc3688266305ea9b42e5017e.rtpl.php:49 192#: tmp/page.footer.b91ef64efc3688266305ea9b42e5017e.rtpl.php:50
193#: tmp/page.footer.cedf684561d925457130839629000a81.rtpl.php:15 193#: tmp/page.footer.cedf684561d925457130839629000a81.rtpl.php:15
194#: tmp/page.footer.cedf684561d925457130839629000a81.rtpl.php:49 194#: tmp/page.footer.cedf684561d925457130839629000a81.rtpl.php:50
195msgid "" 195msgid ""
196"The personal, minimalist, super-fast, database free, bookmarking service" 196"The personal, minimalist, super-fast, database free, bookmarking service"
197msgstr "" 197msgstr ""
@@ -347,16 +347,6 @@ msgstr ""
347"le serveur web peut accepter (%s). Merci de l'envoyer en parties plus " 347"le serveur web peut accepter (%s). Merci de l'envoyer en parties plus "
348"légères." 348"légères."
349 349
350#: application/front/controller/admin/ManageShaareController.php:64
351#: application/front/controller/admin/ManageShaareController.php:95
352#: application/front/controller/admin/ManageShaareController.php:193
353#: application/front/controller/admin/ManageShaareController.php:262
354#: application/front/controller/admin/ManageShaareController.php:302
355#: application/front/controller/admin/ManageShaareController.php:181
356#: application/front/controller/admin/ManageShaareController.php:239
357#: application/front/controller/admin/ManageShaareController.php:247
358#: application/front/controller/admin/ManageShaareController.php:378
359#: application/front/controller/admin/ManageShaareController.php:381
360#: application/front/controller/admin/ManageTagController.php:29 350#: application/front/controller/admin/ManageTagController.php:29
361#: tmp/changetag.b91ef64efc3688266305ea9b42e5017e.rtpl.php:13 351#: tmp/changetag.b91ef64efc3688266305ea9b42e5017e.rtpl.php:13
362#: tmp/tools.b91ef64efc3688266305ea9b42e5017e.rtpl.php:42 352#: tmp/tools.b91ef64efc3688266305ea9b42e5017e.rtpl.php:42
@@ -429,6 +419,20 @@ msgstr "Le cache des miniatures a été vidé."
429msgid "Shaarli's cache folder has been cleared!" 419msgid "Shaarli's cache folder has been cleared!"
430msgstr "Le dossier de cache de Shaarli a été vidé !" 420msgstr "Le dossier de cache de Shaarli a été vidé !"
431 421
422#: application/front/controller/admin/ShaareAddController.php:26
423#: tmp/addlink.b91ef64efc3688266305ea9b42e5017e.rtpl.php:13
424msgid "Shaare a new link"
425msgstr "Partagez un nouveau lien"
426
427#: application/front/controller/admin/ShaareManageController.php:35
428#: application/front/controller/admin/ShaareManageController.php:93
429msgid "Invalid bookmark ID provided."
430msgstr "L'ID du marque-page fourni n'est pas valide."
431
432#: application/front/controller/admin/ShaareManageController.php:47
433#: application/front/controller/admin/ShaareManageController.php:116
434#: application/front/controller/admin/ShaareManageController.php:156
435#: application/front/controller/admin/ShaarePublishController.php:82
432#, php-format 436#, php-format
433msgid "Bookmark with identifier %s could not be found." 437msgid "Bookmark with identifier %s could not be found."
434msgstr "Le lien avec l'identifiant %s n'a pas pu être trouvé." 438msgstr "Le lien avec l'identifiant %s n'a pas pu être trouvé."
@@ -437,18 +441,18 @@ msgstr "Le lien avec l'identifiant %s n'a pas pu être trouvé."
437msgid "Invalid visibility provided." 441msgid "Invalid visibility provided."
438msgstr "Visibilité du lien non valide." 442msgstr "Visibilité du lien non valide."
439 443
440#: application/front/controller/admin/ShaarePublishController.php:154 444#: application/front/controller/admin/ShaarePublishController.php:168
441#: tmp/linklist.b91ef64efc3688266305ea9b42e5017e.rtpl.php:171 445#: tmp/linklist.b91ef64efc3688266305ea9b42e5017e.rtpl.php:171
442msgid "Edit" 446msgid "Edit"
443msgstr "Modifier" 447msgstr "Modifier"
444 448
445#: application/front/controller/admin/ShaarePublishController.php:157 449#: application/front/controller/admin/ShaarePublishController.php:171
446#: tmp/page.header.b91ef64efc3688266305ea9b42e5017e.rtpl.php:28 450#: tmp/page.header.b91ef64efc3688266305ea9b42e5017e.rtpl.php:28
447#: tmp/page.header.cedf684561d925457130839629000a81.rtpl.php:28 451#: tmp/page.header.cedf684561d925457130839629000a81.rtpl.php:28
448msgid "Shaare" 452msgid "Shaare"
449msgstr "Shaare" 453msgstr "Shaare"
450 454
451#: application/front/controller/admin/ShaarePublishController.php:184 455#: application/front/controller/admin/ShaarePublishController.php:202
452msgid "Note: " 456msgid "Note: "
453msgstr "Note : " 457msgstr "Note : "
454 458
@@ -905,7 +909,7 @@ msgstr "Mauvaise réponse du hub %s"
905msgid "Enable PubSubHubbub feed publishing." 909msgid "Enable PubSubHubbub feed publishing."
906msgstr "Active la publication de flux vers PubSubHubbub." 910msgstr "Active la publication de flux vers PubSubHubbub."
907 911
908#: plugins/qrcode/qrcode.php:73 plugins/wallabag/wallabag.php:70 912#: plugins/qrcode/qrcode.php:73 plugins/wallabag/wallabag.php:71
909msgid "For each link, add a QRCode icon." 913msgid "For each link, add a QRCode icon."
910msgstr "Pour chaque lien, ajouter une icône de QRCode." 914msgstr "Pour chaque lien, ajouter une icône de QRCode."
911 915
@@ -917,15 +921,15 @@ msgstr ""
917"Erreur de l'extension Wallabag : Merci de définir le paramètre « " 921"Erreur de l'extension Wallabag : Merci de définir le paramètre « "
918"WALLABAG_URL » dans la page d'administration des extensions." 922"WALLABAG_URL » dans la page d'administration des extensions."
919 923
920#: plugins/wallabag/wallabag.php:47 924#: plugins/wallabag/wallabag.php:48
921msgid "Save to wallabag" 925msgid "Save to wallabag"
922msgstr "Sauvegarder dans Wallabag" 926msgstr "Sauvegarder dans Wallabag"
923 927
924#: plugins/wallabag/wallabag.php:71 928#: plugins/wallabag/wallabag.php:72
925msgid "Wallabag API URL" 929msgid "Wallabag API URL"
926msgstr "URL de l'API Wallabag" 930msgstr "URL de l'API Wallabag"
927 931
928#: plugins/wallabag/wallabag.php:72 932#: plugins/wallabag/wallabag.php:73
929msgid "Wallabag API version (1 or 2)" 933msgid "Wallabag API version (1 or 2)"
930msgstr "Version de l'API Wallabag (1 ou 2)" 934msgstr "Version de l'API Wallabag (1 ou 2)"
931 935
@@ -1013,11 +1017,11 @@ msgstr "Renommer le tag"
1013msgid "Delete tag" 1017msgid "Delete tag"
1014msgstr "Supprimer le tag" 1018msgstr "Supprimer le tag"
1015 1019
1016#: tmp/changetag.b91ef64efc3688266305ea9b42e5017e.rtpl.php:39 1020#: tmp/changetag.b91ef64efc3688266305ea9b42e5017e.rtpl.php:40
1017msgid "You can also edit tags in the" 1021msgid "You can also edit tags in the"
1018msgstr "Vous pouvez aussi modifier les tags dans la" 1022msgstr "Vous pouvez aussi modifier les tags dans la"
1019 1023
1020#: tmp/changetag.b91ef64efc3688266305ea9b42e5017e.rtpl.php:39 1024#: tmp/changetag.b91ef64efc3688266305ea9b42e5017e.rtpl.php:40
1021msgid "tag list" 1025msgid "tag list"
1022msgstr "liste des tags" 1026msgstr "liste des tags"
1023 1027
@@ -1165,7 +1169,7 @@ msgid "None"
1165msgstr "Aucune" 1169msgstr "Aucune"
1166 1170
1167#: tmp/configure.b91ef64efc3688266305ea9b42e5017e.rtpl.php:355 1171#: tmp/configure.b91ef64efc3688266305ea9b42e5017e.rtpl.php:355
1168#: tmp/editlink.b91ef64efc3688266305ea9b42e5017e.rtpl.php:102 1172#: tmp/editlink.b91ef64efc3688266305ea9b42e5017e.rtpl.php:121
1169#: tmp/pluginsadmin.b91ef64efc3688266305ea9b42e5017e.rtpl.php:139 1173#: tmp/pluginsadmin.b91ef64efc3688266305ea9b42e5017e.rtpl.php:139
1170#: tmp/pluginsadmin.b91ef64efc3688266305ea9b42e5017e.rtpl.php:199 1174#: tmp/pluginsadmin.b91ef64efc3688266305ea9b42e5017e.rtpl.php:199
1171msgid "Save" 1175msgid "Save"
@@ -1196,27 +1200,27 @@ msgid_plural ""
1196msgstr[0] ":type suivant" 1200msgstr[0] ":type suivant"
1197msgstr[1] "" 1201msgstr[1] ""
1198 1202
1199#: tmp/editlink.b91ef64efc3688266305ea9b42e5017e.rtpl.php:21 1203#: tmp/editlink.b91ef64efc3688266305ea9b42e5017e.rtpl.php:30
1200msgid "Edit Shaare" 1204msgid "Edit Shaare"
1201msgstr "Modifier le Shaare" 1205msgstr "Modifier le Shaare"
1202 1206
1203#: tmp/editlink.b91ef64efc3688266305ea9b42e5017e.rtpl.php:21 1207#: tmp/editlink.b91ef64efc3688266305ea9b42e5017e.rtpl.php:30
1204msgid "New Shaare" 1208msgid "New Shaare"
1205msgstr "Nouveau Shaare" 1209msgstr "Nouveau Shaare"
1206 1210
1207#: tmp/editlink.b91ef64efc3688266305ea9b42e5017e.rtpl.php:29 1211#: tmp/editlink.b91ef64efc3688266305ea9b42e5017e.rtpl.php:38
1208msgid "Created:" 1212msgid "Created:"
1209msgstr "Création :" 1213msgstr "Création :"
1210 1214
1211#: tmp/editlink.b91ef64efc3688266305ea9b42e5017e.rtpl.php:32 1215#: tmp/editlink.b91ef64efc3688266305ea9b42e5017e.rtpl.php:41
1212msgid "URL" 1216msgid "URL"
1213msgstr "URL" 1217msgstr "URL"
1214 1218
1215#: tmp/editlink.b91ef64efc3688266305ea9b42e5017e.rtpl.php:38 1219#: tmp/editlink.b91ef64efc3688266305ea9b42e5017e.rtpl.php:47
1216msgid "Title" 1220msgid "Title"
1217msgstr "Titre" 1221msgstr "Titre"
1218 1222
1219#: tmp/editlink.b91ef64efc3688266305ea9b42e5017e.rtpl.php:49 1223#: tmp/editlink.b91ef64efc3688266305ea9b42e5017e.rtpl.php:58
1220#: tmp/pluginsadmin.b91ef64efc3688266305ea9b42e5017e.rtpl.php:42 1224#: tmp/pluginsadmin.b91ef64efc3688266305ea9b42e5017e.rtpl.php:42
1221#: tmp/pluginsadmin.b91ef64efc3688266305ea9b42e5017e.rtpl.php:75 1225#: tmp/pluginsadmin.b91ef64efc3688266305ea9b42e5017e.rtpl.php:75
1222#: tmp/pluginsadmin.b91ef64efc3688266305ea9b42e5017e.rtpl.php:99 1226#: tmp/pluginsadmin.b91ef64efc3688266305ea9b42e5017e.rtpl.php:99
@@ -1224,21 +1228,19 @@ msgstr "Titre"
1224msgid "Description" 1228msgid "Description"
1225msgstr "Description" 1229msgstr "Description"
1226 1230
1227#: tmp/editlink.b91ef64efc3688266305ea9b42e5017e.rtpl.php:58 1231#: tmp/editlink.b91ef64efc3688266305ea9b42e5017e.rtpl.php:89
1228#: tmp/editlink.b91ef64efc3688266305ea9b42e5017e.rtpl.php:74
1229#: tmp/editlink.b91ef64efc3688266305ea9b42e5017e.rtpl.php:80
1230msgid "Description will be rendered with" 1232msgid "Description will be rendered with"
1231msgstr "La description sera générée avec" 1233msgstr "La description sera générée avec"
1232 1234
1233#: tmp/editlink.b91ef64efc3688266305ea9b42e5017e.rtpl.php:82 1235#: tmp/editlink.b91ef64efc3688266305ea9b42e5017e.rtpl.php:91
1234msgid "Markdown syntax documentation" 1236msgid "Markdown syntax documentation"
1235msgstr "Documentation sur la syntaxe Markdown" 1237msgstr "Documentation sur la syntaxe Markdown"
1236 1238
1237#: tmp/editlink.b91ef64efc3688266305ea9b42e5017e.rtpl.php:83 1239#: tmp/editlink.b91ef64efc3688266305ea9b42e5017e.rtpl.php:92
1238msgid "Markdown syntax" 1240msgid "Markdown syntax"
1239msgstr "la syntaxe Markdown" 1241msgstr "la syntaxe Markdown"
1240 1242
1241#: tmp/editlink.b91ef64efc3688266305ea9b42e5017e.rtpl.php:102 1243#: tmp/editlink.b91ef64efc3688266305ea9b42e5017e.rtpl.php:115
1242msgid "Cancel" 1244msgid "Cancel"
1243msgstr "Annuler" 1245msgstr "Annuler"
1244 1246
@@ -1246,12 +1248,7 @@ msgstr "Annuler"
1246msgid "Apply Changes" 1248msgid "Apply Changes"
1247msgstr "Appliquer les changements" 1249msgstr "Appliquer les changements"
1248 1250
1249#: tmp/editlink.batch.b91ef64efc3688266305ea9b42e5017e.rtpl.php:12 1251#: tmp/editlink.b91ef64efc3688266305ea9b42e5017e.rtpl.php:126
1250#: tmp/editlink.batch.b91ef64efc3688266305ea9b42e5017e.rtpl.php:23
1251msgid "Save all"
1252msgstr "Tout enregistrer"
1253
1254#: tmp/editlink.b91ef64efc3688266305ea9b42e5017e.rtpl.php:107
1255#: tmp/linklist.b91ef64efc3688266305ea9b42e5017e.rtpl.php:173 1252#: tmp/linklist.b91ef64efc3688266305ea9b42e5017e.rtpl.php:173
1256#: tmp/page.header.b91ef64efc3688266305ea9b42e5017e.rtpl.php:147 1253#: tmp/page.header.b91ef64efc3688266305ea9b42e5017e.rtpl.php:147
1257#: tmp/page.header.cedf684561d925457130839629000a81.rtpl.php:147 1254#: tmp/page.header.cedf684561d925457130839629000a81.rtpl.php:147
@@ -1259,6 +1256,11 @@ msgstr "Tout enregistrer"
1259msgid "Delete" 1256msgid "Delete"
1260msgstr "Supprimer" 1257msgstr "Supprimer"
1261 1258
1259#: tmp/editlink.batch.b91ef64efc3688266305ea9b42e5017e.rtpl.php:21
1260#: tmp/editlink.batch.b91ef64efc3688266305ea9b42e5017e.rtpl.php:32
1261msgid "Save all"
1262msgstr "Tout enregistrer"
1263
1262#: tmp/export.b91ef64efc3688266305ea9b42e5017e.rtpl.php:16 1264#: tmp/export.b91ef64efc3688266305ea9b42e5017e.rtpl.php:16
1263msgid "Export Database" 1265msgid "Export Database"
1264msgstr "Exporter les données" 1266msgstr "Exporter les données"
@@ -1472,7 +1474,7 @@ msgstr "Afficher uniquement les liens publics"
1472#: tmp/linklist.paging.b91ef64efc3688266305ea9b42e5017e.rtpl.php:18 1474#: tmp/linklist.paging.b91ef64efc3688266305ea9b42e5017e.rtpl.php:18
1473#: tmp/linklist.paging.cedf684561d925457130839629000a81.rtpl.php:18 1475#: tmp/linklist.paging.cedf684561d925457130839629000a81.rtpl.php:18
1474msgid "Filter untagged links" 1476msgid "Filter untagged links"
1475msgstr "Filtrer par liens privés" 1477msgstr "Filtrer par liens sans tag"
1476 1478
1477#: tmp/linklist.paging.b91ef64efc3688266305ea9b42e5017e.rtpl.php:24 1479#: tmp/linklist.paging.b91ef64efc3688266305ea9b42e5017e.rtpl.php:24
1478#: tmp/linklist.paging.cedf684561d925457130839629000a81.rtpl.php:24 1480#: tmp/linklist.paging.cedf684561d925457130839629000a81.rtpl.php:24
@@ -1500,9 +1502,9 @@ msgid "Remember me"
1500msgstr "Rester connecté" 1502msgstr "Rester connecté"
1501 1503
1502#: tmp/page.footer.b91ef64efc3688266305ea9b42e5017e.rtpl.php:15 1504#: tmp/page.footer.b91ef64efc3688266305ea9b42e5017e.rtpl.php:15
1503#: tmp/page.footer.b91ef64efc3688266305ea9b42e5017e.rtpl.php:49 1505#: tmp/page.footer.b91ef64efc3688266305ea9b42e5017e.rtpl.php:50
1504#: tmp/page.footer.cedf684561d925457130839629000a81.rtpl.php:15 1506#: tmp/page.footer.cedf684561d925457130839629000a81.rtpl.php:15
1505#: tmp/page.footer.cedf684561d925457130839629000a81.rtpl.php:49 1507#: tmp/page.footer.cedf684561d925457130839629000a81.rtpl.php:50
1506msgid "by the Shaarli community" 1508msgid "by the Shaarli community"
1507msgstr "par la communauté Shaarli" 1509msgstr "par la communauté Shaarli"
1508 1510
@@ -1523,6 +1525,11 @@ msgstr "Déplier tout"
1523 1525
1524#: tmp/page.footer.b91ef64efc3688266305ea9b42e5017e.rtpl.php:47 1526#: tmp/page.footer.b91ef64efc3688266305ea9b42e5017e.rtpl.php:47
1525#: tmp/page.footer.cedf684561d925457130839629000a81.rtpl.php:47 1527#: tmp/page.footer.cedf684561d925457130839629000a81.rtpl.php:47
1528msgid "Are you sure you want to delete this link?"
1529msgstr "Êtes-vous sûr de vouloir supprimer ce lien ?"
1530
1531#: tmp/page.footer.b91ef64efc3688266305ea9b42e5017e.rtpl.php:48
1532#: tmp/page.footer.cedf684561d925457130839629000a81.rtpl.php:48
1526msgid "Are you sure you want to delete this tag?" 1533msgid "Are you sure you want to delete this tag?"
1527msgstr "Êtes-vous sûr de vouloir supprimer ce tag ?" 1534msgstr "Êtes-vous sûr de vouloir supprimer ce tag ?"
1528 1535
diff --git a/tests/formatter/BookmarkDefaultFormatterTest.php b/tests/formatter/BookmarkDefaultFormatterTest.php
index 3fc6f8dc..4fcc5dd1 100644
--- a/tests/formatter/BookmarkDefaultFormatterTest.php
+++ b/tests/formatter/BookmarkDefaultFormatterTest.php
@@ -289,4 +289,24 @@ class BookmarkDefaultFormatterTest extends TestCase
289 $link['taglist_html'] 289 $link['taglist_html']
290 ); 290 );
291 } 291 }
292
293 /**
294 * Test default formatting with formatter_settings.autolink set to false:
295 * URLs and hashtags should not be transformed
296 */
297 public function testFormatDescriptionWithoutLinkification(): void
298 {
299 $this->conf->set('formatter_settings.autolink', false);
300 $this->formatter = new BookmarkDefaultFormatter($this->conf, false);
301
302 $bookmark = new Bookmark();
303 $bookmark->setDescription('Hi!' . PHP_EOL . 'https://thisisaurl.tld #hashtag');
304
305 $link = $this->formatter->format($bookmark);
306
307 static::assertSame(
308 'Hi!<br />' . PHP_EOL . 'https://thisisaurl.tld &nbsp;#hashtag',
309 $link['description']
310 );
311 }
292} 312}
diff --git a/tests/front/controller/admin/ShaareManageControllerTest/DeleteBookmarkTest.php b/tests/front/controller/admin/ShaareManageControllerTest/DeleteBookmarkTest.php
index 770a16d7..a276d988 100644
--- a/tests/front/controller/admin/ShaareManageControllerTest/DeleteBookmarkTest.php
+++ b/tests/front/controller/admin/ShaareManageControllerTest/DeleteBookmarkTest.php
@@ -38,6 +38,8 @@ class DeleteBookmarkTest extends TestCase
38 { 38 {
39 $parameters = ['id' => '123']; 39 $parameters = ['id' => '123'];
40 40
41 $this->container->environment['HTTP_REFERER'] = 'http://shaarli/subfolder/shaare/abcdef';
42
41 $request = $this->createMock(Request::class); 43 $request = $this->createMock(Request::class);
42 $request 44 $request
43 ->method('getParam') 45 ->method('getParam')
@@ -90,6 +92,8 @@ class DeleteBookmarkTest extends TestCase
90 { 92 {
91 $parameters = ['id' => '123 456 789']; 93 $parameters = ['id' => '123 456 789'];
92 94
95 $this->container->environment['HTTP_REFERER'] = 'http://shaarli/subfolder/?searchtags=abcdef';
96
93 $request = $this->createMock(Request::class); 97 $request = $this->createMock(Request::class);
94 $request 98 $request
95 ->method('getParam') 99 ->method('getParam')
@@ -152,7 +156,7 @@ class DeleteBookmarkTest extends TestCase
152 $result = $this->controller->deleteBookmark($request, $response); 156 $result = $this->controller->deleteBookmark($request, $response);
153 157
154 static::assertSame(302, $result->getStatusCode()); 158 static::assertSame(302, $result->getStatusCode());
155 static::assertSame(['/subfolder/'], $result->getHeader('location')); 159 static::assertSame(['/subfolder/?searchtags=abcdef'], $result->getHeader('location'));
156 } 160 }
157 161
158 /** 162 /**
diff --git a/tpl/default/changetag.html b/tpl/default/changetag.html
index 89d08e2c..a5fbd31e 100644
--- a/tpl/default/changetag.html
+++ b/tpl/default/changetag.html
@@ -28,7 +28,8 @@
28 <input type="hidden" name="token" value="{$token}"> 28 <input type="hidden" name="token" value="{$token}">
29 <div> 29 <div>
30 <input type="submit" value="{'Rename tag'|t}" name="renametag"> 30 <input type="submit" value="{'Rename tag'|t}" name="renametag">
31 <input type="submit" value="{'Delete tag'|t}" name="deletetag" class="button button-red confirm-delete"> 31 <input type="submit" value="{'Delete tag'|t}" name="deletetag"
32 class="button button-red confirm-delete" data-type="tag">
32 </div> 33 </div>
33 </form> 34 </form>
34 35
diff --git a/tpl/default/page.footer.html b/tpl/default/page.footer.html
index c153def0..964ffff1 100644
--- a/tpl/default/page.footer.html
+++ b/tpl/default/page.footer.html
@@ -28,12 +28,13 @@
28 <script src="{$root_path}/{$value}#"></script> 28 <script src="{$root_path}/{$value}#"></script>
29{/loop} 29{/loop}
30 30
31<div id="js-translations" class="hidden"> 31<div id="js-translations" class="hidden" aria-hidden="true">
32 <span id="translation-fold">{'Fold'|t}</span> 32 <span id="translation-fold">{'Fold'|t}</span>
33 <span id="translation-fold-all">{'Fold all'|t}</span> 33 <span id="translation-fold-all">{'Fold all'|t}</span>
34 <span id="translation-expand">{'Expand'|t}</span> 34 <span id="translation-expand">{'Expand'|t}</span>
35 <span id="translation-expand-all">{'Expand all'|t}</span> 35 <span id="translation-expand-all">{'Expand all'|t}</span>
36 <span id="translation-delete-link">{'Are you sure you want to delete this tag?'|t}</span> 36 <span id="translation-delete-link">{'Are you sure you want to delete this link?'|t}</span>
37 <span id="translation-delete-tag">{'Are you sure you want to delete this tag?'|t}</span>
37 <span id="translation-shaarli-desc"> 38 <span id="translation-shaarli-desc">
38 {'The personal, minimalist, super-fast, database free, bookmarking service'|t} {'by the Shaarli community'|t} 39 {'The personal, minimalist, super-fast, database free, bookmarking service'|t} {'by the Shaarli community'|t}
39 </span> 40 </span>