From e6b73df5162c78ff157b14e5e08fefcacb5321d6 Mon Sep 17 00:00:00 2001 From: Valentin Le Moign Date: Wed, 10 Jun 2026 18:48:12 +0200 Subject: [PATCH] =?UTF-8?q?fix:=20sauts=20de=20ligne=20des=20adresses=20af?= =?UTF-8?q?fich=C3=A9s=20sur=20le=20front?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Le champ adresse (single + séances) était rendu brut : les retours à la ligne saisis au back-office n'apparaissaient pas. Application de nl2br + esc_html à la source (les templates le rendent en |raw), pour afficher les adresses sur plusieurs lignes tout en gardant la sortie échappée. Co-Authored-By: Claude Opus 4.8 --- inc/single-helpers.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/inc/single-helpers.php b/inc/single-helpers.php index 0695a07..d7ff126 100644 --- a/inc/single-helpers.php +++ b/inc/single-helpers.php @@ -44,7 +44,7 @@ function thalim_get_single_data($post_id) { 'editeur' => get_post_meta($post_id, 'editeur', true) ?: '', 'journal' => get_post_meta($post_id, 'journal', true) ?: '', 'lieu' => thalim_bilingual( get_post_meta($post_id, 'lieu', true) ?: '', $lang ), - 'adresse' => get_post_meta($post_id, 'adresse', true) ?: '', + 'adresse' => nl2br( esc_html( get_post_meta($post_id, 'adresse', true) ?: '' ) ), 'autrepersonnes' => get_post_meta($post_id, 'autrepersonnes', true) ?: '', 'autre_autrepersonnes' => get_post_meta($post_id, 'autre_autrepersonnes', true) ?: '', 'body_en' => apply_filters( 'the_content', get_post_meta($post_id, 'body_en', true) ?: '' ), @@ -302,7 +302,7 @@ function thalim_get_single_data($post_id) { 'heure_de_debut' => substr( get_post_meta($seance->ID, 'heure_de_debut', true) ?: '', 0, 5 ), 'heure_de_fin' => substr( get_post_meta($seance->ID, 'heure_de_fin', true) ?: '', 0, 5 ), 'lieu' => thalim_bilingual( get_post_meta($seance->ID, 'lieu', true) ?: '', $lang ), - 'adresse' => get_post_meta($seance->ID, 'adresse', true) ?: '', + 'adresse' => nl2br( esc_html( get_post_meta($seance->ID, 'adresse', true) ?: '' ) ), 'body_en' => apply_filters( 'the_content', get_post_meta($seance->ID, 'body_en', true) ?: '' ), 'intervenants' => [], 'images' => [],