From 05ccb45fe4dbc5ca9fcd806f48b46cd1411b0cd8 Mon Sep 17 00:00:00 2001 From: ghassan Date: Wed, 21 Oct 2026 12:01:04 +0300 Subject: [PATCH] feat(admin): strip HTML in video list + First/Last pagination MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Admin video list: description was stored as sanitized rich HTML, so the admin's "{{ Str::limit(description, 55) }}" row printed literal

…

tags in the preview. Pre-strip the HTML, collapse whitespace, and surface the full stripped text in a title="" tooltip. The visible title column now also carries title="" so the admin can hover an ellipsized name to read it in full. - Shared pagination partial (used by admin videos + users + feed pagers) now ships First + Last buttons. The icons use the double- chevron variants and the aria-label makes the destination explicit. Buttons disable cleanly on page 1 and the last page. - Audit-logs pager has the same four buttons: First, Prev, N…N, Next, Last. Each disabled state carries a title tooltip so the admin knows what each stub does without hovering through trial and error. Co-Authored-By: Claude Opus 4.7 (1M context) --- resources/views/admin/audit-logs.blade.php | 26 +++++++++--- resources/views/admin/videos.blade.php | 19 +++++++-- resources/views/partials/pagination.blade.php | 40 ++++++++++++++----- 3 files changed, 68 insertions(+), 17 deletions(-) diff --git a/resources/views/admin/audit-logs.blade.php b/resources/views/admin/audit-logs.blade.php index 10e11ed..e67570f 100644 --- a/resources/views/admin/audit-logs.blade.php +++ b/resources/views/admin/audit-logs.blade.php @@ -351,24 +351,40 @@ Showing {{ $logs->firstItem() }}–{{ $logs->lastItem() }} of {{ $logs->total() }} events diff --git a/resources/views/admin/videos.blade.php b/resources/views/admin/videos.blade.php index 25c7cc5..f0134c2 100644 --- a/resources/views/admin/videos.blade.php +++ b/resources/views/admin/videos.blade.php @@ -125,12 +125,25 @@ $adminNeedsOtp = auth()->user()->two_factor_enabled && @endif
-
+ {{-- Full title in the title attribute so the + admin can hover and read the whole thing + when the visible row ellipsizes. --}} +
{{ $video->title }}
@if($video->description) -
- {{ Str::limit($video->description, 55) }} + @php + // Descriptions are stored as sanitized rich HTML + // (see HtmlSanitizer). Blade's {{ }} would show + // the escaped tags verbatim in the admin table, + // so strip them to a plain-text preview — and + // put the full stripped text in the tooltip too. + $descPlain = trim(preg_replace('/\s+/', ' ', strip_tags((string) $video->description))); + @endphp +
+ {{ Str::limit($descPlain, 55) }}
@endif
diff --git a/resources/views/partials/pagination.blade.php b/resources/views/partials/pagination.blade.php index e457573..5570740 100644 --- a/resources/views/partials/pagination.blade.php +++ b/resources/views/partials/pagination.blade.php @@ -37,14 +37,25 @@ a.pag-item:hover { @endonce