From cec90ca497d70ff9ebbdc27958f9540844395e7f Mon Sep 17 00:00:00 2001 From: Jan-Hendrik Willms <tleilax+studip@gmail.com> Date: Fri, 15 Mar 2024 15:53:31 +0000 Subject: [PATCH] fixes #3145 Closes #3145 Merge request studip/studip!2119 --- lib/classes/sidebar/LinkCloudWidget.php | 3 --- lib/classes/sidebar/LinkElement.php | 3 --- lib/classes/sidebar/OptionsWidget.php | 7 ------- lib/classes/sidebar/SearchWidget.php | 3 --- lib/classes/sidebar/SelectWidget.php | 3 --- 5 files changed, 19 deletions(-) diff --git a/lib/classes/sidebar/LinkCloudWidget.php b/lib/classes/sidebar/LinkCloudWidget.php index de4db55ab88..b683aeff577 100644 --- a/lib/classes/sidebar/LinkCloudWidget.php +++ b/lib/classes/sidebar/LinkCloudWidget.php @@ -28,9 +28,6 @@ class LinkCloudWidget extends LinksWidget */ public function &addLink($label, $url, $icon = null, $attributes = [], $index = null) { - // TODO: Remove this some versions after 5.0 - $url = html_entity_decode($url); - $content = sprintf( '<a href="%s" class="%s">%s</a>', htmlReady($url), diff --git a/lib/classes/sidebar/LinkElement.php b/lib/classes/sidebar/LinkElement.php index 8476c3ec448..f8d768b78eb 100644 --- a/lib/classes/sidebar/LinkElement.php +++ b/lib/classes/sidebar/LinkElement.php @@ -76,9 +76,6 @@ class LinkElement extends WidgetElement implements ArrayAccess { parent::__construct(); - // TODO: Remove this some versions after 5.0 - $url = html_entity_decode($url); - $this->label = $label; $this->url = $url; $this->attributes = $attributes; diff --git a/lib/classes/sidebar/OptionsWidget.php b/lib/classes/sidebar/OptionsWidget.php index 5f44c0c7aa0..5331e611f6c 100644 --- a/lib/classes/sidebar/OptionsWidget.php +++ b/lib/classes/sidebar/OptionsWidget.php @@ -36,10 +36,6 @@ class OptionsWidget extends ListWidget ?string $toggle_url_off = null, array $attributes = [] ): ButtonElement { - // TODO: Remove this some versions after 5.0 - $toggle_url = html_entity_decode($toggle_url); - $toggle_url_off = isset($toggle_url_off) ? html_entity_decode($toggle_url_off) : null; - $attributes['class'] = trim(($attributes['class'] ?? '') . ' options-checkbox options-' . ($state ? 'checked' : 'unchecked')); return $this->addElement( @@ -67,9 +63,6 @@ class OptionsWidget extends ListWidget $checked = false, array $attributes = [] ): ButtonElement { - // TODO: Remove this some versions after 5.0 - $url = html_entity_decode($url); - $attributes['class'] = trim(($attributes['class'] ?? '') . ' options-radio options-' . ($checked ? 'checked' : 'unchecked')); return $this->addElement( diff --git a/lib/classes/sidebar/SearchWidget.php b/lib/classes/sidebar/SearchWidget.php index 16d577b62d8..5a42e948be4 100644 --- a/lib/classes/sidebar/SearchWidget.php +++ b/lib/classes/sidebar/SearchWidget.php @@ -27,9 +27,6 @@ class SearchWidget extends SidebarWidget { parent::__construct(); - // TODO: Remove this some versions after 5.0 - $url = html_entity_decode($url); - $this->url = $url ?: $_SERVER['REQUEST_URI']; $this->title = _('Suche'); $this->template = 'sidebar/search-widget'; diff --git a/lib/classes/sidebar/SelectWidget.php b/lib/classes/sidebar/SelectWidget.php index 772004cb78b..c33b2b6b17e 100644 --- a/lib/classes/sidebar/SelectWidget.php +++ b/lib/classes/sidebar/SelectWidget.php @@ -39,9 +39,6 @@ class SelectWidget extends SidebarWidget */ public function setUrl($url) { - // TODO: Remove this some versions after 5.0 - $url = html_entity_decode($url); - $query = parse_url($url, PHP_URL_QUERY); if ($query) { $url = str_replace('?' . $query , '', $url); -- GitLab