Fix textarea HTML rendering and enforce light FilePond panels

This commit is contained in:
Jürgen Mummert
2026-03-01 12:11:08 +01:00
parent 84a6f118dc
commit 76be3bcd09
3 changed files with 23 additions and 1 deletions
@@ -41,6 +41,12 @@
background: #f7f7f7; background: #f7f7f7;
} }
.module-event-edit .filepond--root .filepond--panel-root,
.module-event-edit .filepond--root .filepond--item-panel,
.module-event-edit .filepond--root .filepond--image-preview {
background-color: #f7f7f7 !important;
}
.module-event-edit .filepond--root .filepond--image-preview-overlay-idle, .module-event-edit .filepond--root .filepond--image-preview-overlay-idle,
.module-event-edit .filepond--root .filepond--image-preview-overlay-success, .module-event-edit .filepond--root .filepond--image-preview-overlay-success,
.module-event-edit .filepond--root .filepond--image-preview-overlay-failure { .module-event-edit .filepond--root .filepond--image-preview-overlay-failure {
@@ -39,6 +39,12 @@
background: #f7f7f7; background: #f7f7f7;
} }
.module-organization-edit .filepond--root .filepond--panel-root,
.module-organization-edit .filepond--root .filepond--item-panel,
.module-organization-edit .filepond--root .filepond--image-preview {
background-color: #f7f7f7 !important;
}
.module-organization-edit .filepond--root .filepond--image-preview-overlay-idle, .module-organization-edit .filepond--root .filepond--image-preview-overlay-idle,
.module-organization-edit .filepond--root .filepond--image-preview-overlay-success, .module-organization-edit .filepond--root .filepond--image-preview-overlay-success,
.module-organization-edit .filepond--root .filepond--image-preview-overlay-failure { .module-organization-edit .filepond--root .filepond--image-preview-overlay-failure {
@@ -76,7 +76,7 @@ class OrganizationEditController extends AbstractFrontendModuleController
'phone' => (string) ($organization['phone'] ?? ''), 'phone' => (string) ($organization['phone'] ?? ''),
'email' => (string) ($organization['email'] ?? ''), 'email' => (string) ($organization['email'] ?? ''),
'website' => (string) ($organization['website'] ?? ''), 'website' => (string) ($organization['website'] ?? ''),
'description' => (string) ($organization['description'] ?? ''), 'description' => $this->normalizeTextareaDescription((string) ($organization['description'] ?? '')),
'tags' => $this->organizationRepository->getTagIdsForOrganization($organizationId), 'tags' => $this->organizationRepository->getTagIdsForOrganization($organizationId),
]; ];
@@ -218,4 +218,14 @@ class OrganizationEditController extends AbstractFrontendModuleController
return $page instanceof PageModel ? $this->generateContentUrl($page) : '/'; return $page instanceof PageModel ? $this->generateContentUrl($page) : '/';
} }
private function normalizeTextareaDescription(string $value): string
{
$decoded = html_entity_decode($value, ENT_QUOTES | ENT_HTML5, 'UTF-8');
$decoded = preg_replace('/<\s*br\s*\/?>/i', "\n", $decoded) ?? $decoded;
$decoded = preg_replace('/<\s*\/p\s*>\s*<\s*p[^>]*>/i', "\n\n", $decoded) ?? $decoded;
$decoded = strip_tags($decoded);
return trim($decoded);
}
} }