diff --git a/app/Libraries/ViewComponents/ComponentRenderer.php b/app/Libraries/ViewComponents/ComponentRenderer.php index 76495398..7eb0984d 100644 --- a/app/Libraries/ViewComponents/ComponentRenderer.php +++ b/app/Libraries/ViewComponents/ComponentRenderer.php @@ -96,7 +96,7 @@ class ComponentRenderer private function renderPairedTags(string $output): string { - $pattern = '/<\s*(?[A-Z][A-Za-z0-9\.]*?)(?[\s\S\=\'\"]*)>(?.*)<\/\s*\1\s*>/uUsm'; + $pattern = '/<\s*(?[A-Z][A-Za-z0-9\.]*?)(?(\s*[\w\-]+\s*=\s*(\'[^\']*\'|\"[^\"]*\"))+\s*)>(?.*)<\/\s*\1\s*>/uUsm'; ini_set('pcre.backtrack_limit', '-1'); /* $matches[0] = full tags matched and all of its content diff --git a/app/Views/Components/Button.php b/app/Views/Components/Button.php index 89115bae..4f15bfe7 100644 --- a/app/Views/Components/Button.php +++ b/app/Views/Components/Button.php @@ -81,6 +81,10 @@ class Button extends Component unset($this->attributes['class']); } + if ($this->iconLeft !== '' || $this->iconRight !== '') { + $this->slot = '' . $this->slot . ''; + } + if ($this->iconLeft !== '') { $this->slot = (new Icon([ 'glyph' => $this->iconLeft, diff --git a/modules/PodcastImport/Commands/PodcastImport.php b/modules/PodcastImport/Commands/PodcastImport.php index 4d1abe6a..9104f9ed 100644 --- a/modules/PodcastImport/Commands/PodcastImport.php +++ b/modules/PodcastImport/Commands/PodcastImport.php @@ -209,6 +209,11 @@ class PodcastImport extends BaseCommand throw new Exception('Missing podcast cover. Please include an tag'); } + $parentalAdvisory = null; + if ($this->podcastFeed->channel->itunes_explicit->getValue() !== null) { + $parentalAdvisory = $this->podcastFeed->channel->itunes_explicit->getValue() ? 'explicit' : 'clean'; + } + $htmlConverter = new HtmlConverter(); $podcast = new Podcast([ 'created_by' => $this->user->id, @@ -224,7 +229,7 @@ class PodcastImport extends BaseCommand 'banner' => null, 'language_code' => $this->importTask->language, 'category_id' => $this->importTask->category, - 'parental_advisory' => $this->podcastFeed->channel->itunes_explicit->getValue(), + 'parental_advisory' => $parentalAdvisory, 'owner_name' => $this->podcastFeed->channel->itunes_owner->itunes_name->getValue(), 'owner_email' => $this->podcastFeed->channel->itunes_owner->itunes_email->getValue(), 'publisher' => $this->podcastFeed->channel->itunes_author->getValue(), @@ -439,6 +444,11 @@ class PodcastImport extends BaseCommand $coverUrl = $this->getCoverUrl($item); + $parentalAdvisory = null; + if ($item->itunes_explicit->getValue() !== null) { + $parentalAdvisory = $item->itunes_explicit->getValue() ? 'explicit' : 'clean'; + } + $episode = new Episode([ 'created_by' => $this->user->id, 'updated_by' => $this->user->id, @@ -455,7 +465,7 @@ class PodcastImport extends BaseCommand 'description_markdown' => $htmlConverter->convert($showNotes), 'description_html' => $showNotes, 'cover' => $coverUrl ? download_file($coverUrl) : null, - 'parental_advisory' => $item->itunes_explicit->getValue(), + 'parental_advisory' => $parentalAdvisory, 'number' => $item->itunes_episode->getValue(), 'season_number' => $item->itunes_season->getValue(), 'type' => $item->itunes_episodeType->getValue(), diff --git a/themes/cp_admin/_partials/_nav_header.php b/themes/cp_admin/_partials/_nav_header.php index 1633fb52..5c5c00c5 100644 --- a/themes/cp_admin/_partials/_nav_header.php +++ b/themes/cp_admin/_partials/_nav_header.php @@ -16,7 +16,7 @@ $userPodcasts = get_podcasts_user_can_interact_with(auth()->user()); ?> 'home', ) ?>" class="inline-flex items-center h-full px-2 text-sm font-semibold sm:px-6 hover:underline focus:ring-inset focus:ring-accent" title=""> - +
diff --git a/themes/cp_admin/podcast/view.php b/themes/cp_admin/podcast/view.php index ece3ca9d..c899e852 100644 --- a/themes/cp_admin/podcast/view.php +++ b/themes/cp_admin/podcast/view.php @@ -9,8 +9,8 @@ endSection() ?> section('headerRight') ?> - - + + endSection() ?> section('content') ?>