Skip to content

Commit

Permalink
Strip html from noRegistrationMessage
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
DeD1rk committed Sep 14, 2022
1 parent 2ff9ef8 commit 1c8ede2
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/ui/screens/event_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -459,7 +459,8 @@ class _EventScreenState extends State<EventScreen> {
}

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.'));
}
Expand Down Expand Up @@ -491,7 +492,8 @@ class _EventScreenState extends State<EventScreen> {

final textSpans = <TextSpan>[];
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.'));
}
Expand Down

0 comments on commit 1c8ede2

Please sign in to comment.