@extends('public.layout') @section('title', $area->name.' — Noesantara Law Firm') @push('meta') @php $serviceSchema = [ '@context' => 'https://schema.org', '@type' => 'Service', 'name' => $area->name, 'description' => $area->excerpt ?: \Illuminate\Support\Str::limit(strip_tags($area->description ?? ''), 160), 'provider' => [ '@type' => 'LegalService', 'name' => \App\Models\Setting::get('site.brand','Noesantara Law Firm') ], 'url' => request()->fullUrl(), 'areaServed' => 'ID', 'offers' => [ '@type' => 'Offer', 'availability' => 'https://schema.org/InStock', 'price' => 0, 'priceCurrency' => 'IDR' ], ]; @endphp @endpush @push('meta') @php $breadcrumbs = [ '@context' => 'https://schema.org', '@type' => 'BreadcrumbList', 'itemListElement' => [ [ '@type' => 'ListItem', 'position' => 1, 'name' => 'Home', 'item' => url('/') ], [ '@type' => 'ListItem', 'position' => 2, 'name' => 'Practice', 'item' => url('/practice') ], [ '@type' => 'ListItem', 'position' => 3, 'name' => $area->name, 'item' => request()->fullUrl() ], ], ]; @endphp @endpush @section('content')

{{ $area->name }}

@if($area->excerpt)

{{ $area->excerpt }}

@endif
@if($area->image_url)
{{ $area->image_alt ?? $area->name }}
@endif
@php // Allow a safe subset of HTML tags and attributes for rich content $allowed_tags = [ 'p' => ['class'], 'br' => [], 'strong' => [], 'em' => [], 'u' => [], 's' => [], 'ul' => ['class'], 'ol' => ['class'], 'li' => ['class'], 'h2' => ['class'], 'h3' => ['class'], 'h4' => ['class'], 'blockquote' => ['class'], 'hr' => [], 'a' => ['href','title','target','rel','class'], 'code' => ['class'], 'pre' => ['class'], ]; $clean = \Illuminate\Support\Str::of($area->description ?? '')->toString(); // Use Laravel Purifier if available, otherwise a basic strip_tags allowlist if (function_exists('clean')) { // mews/purifier optional $html = clean($clean, ['HTML.Allowed' => implode(',', array_map(function($tag,$attrs){ return $tag.($attrs? '['.implode('|',$attrs).']' : ''); }, array_keys($allowed_tags), $allowed_tags))]); } else { // Fallback: sanitize using helper $html = \App\Support\HtmlSanitizer::clean($clean, $allowed_tags); } @endphp {!! $html !!}
@endsection