From 1c8ede2c6ac77b34606cb6f810bcaa7809100115 Mon Sep 17 00:00:00 2001 From: Dirk Doesburg Date: Wed, 14 Sep 2022 18:53:48 +0200 Subject: [PATCH] Strip html from noRegistrationMessage Concrexit now allows html in them, but we can't support it without significant UI changes, so for now let's just strip the markup. --- lib/ui/screens/event_screen.dart | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/ui/screens/event_screen.dart b/lib/ui/screens/event_screen.dart index 577907f81..785cbfa94 100644 --- a/lib/ui/screens/event_screen.dart +++ b/lib/ui/screens/event_screen.dart @@ -459,7 +459,8 @@ class _EventScreenState extends State { } if (event.noRegistrationMessage?.isNotEmpty ?? false) { - textSpans.add(TextSpan(text: event.noRegistrationMessage)); + final htmlStripped = Bidi.stripHtmlIfNeeded(event.noRegistrationMessage!); + textSpans.add(TextSpan(text: htmlStripped)); } else { textSpans.add(const TextSpan(text: 'No registration required.')); } @@ -491,7 +492,8 @@ class _EventScreenState extends State { final textSpans = []; if (event.noRegistrationMessage?.isNotEmpty ?? false) { - textSpans.add(TextSpan(text: event.noRegistrationMessage)); + final htmlStripped = Bidi.stripHtmlIfNeeded(event.noRegistrationMessage!); + textSpans.add(TextSpan(text: htmlStripped)); } else { textSpans.add(const TextSpan(text: 'No registration required.')); }