# Blade Templates (Laravel) > Blade 구문, 디렉티브, 레이아웃, 컴포넌트, 슬롯, 인클루드, 조건부 렌더링, 루프 - 18 면접 질문 - Junior - [면접 질문: Laravel](https://sharpskill.dev/ko/technologies/laravel/interview-questions.md) ## 1. XSS 취약점을 방지하기 위해 HTML 문자를 자동으로 이스케이프하면서 변수를 표시하는 Blade 구문은 무엇입니까? **답변** {{ $variable }} 구문은 htmlspecialchars를 사용하여 HTML 문자를 자동으로 이스케이프하여 XSS 공격으로부터 보호합니다. 사용자 데이터를 표시할 때는 항상 기본적으로 {{ }} 를 사용하고, {!! !!} 로 이스케이프되지 않은 HTML을 표시해야 하는 경우에만 예외로 합니다. ## 2. {{ $html }} 와 {!! $html !!} 의 주요 차이점은 무엇입니까? **답변** {{ $html }} 는 XSS 인젝션을 방지하기 위해 HTML 문자를 자동으로 이스케이프하지만, {!! $html !!} 는 이스케이프 없이 원본 콘텐츠를 표시합니다. {!! !!} 는 내부에서 생성되거나 검증된 신뢰할 수 있는 HTML을 표시할 때만 사용하세요. 사용자 데이터를 {!! !!} 로 표시하면 절대 안 됩니다. ## 3. 자식 Blade 템플릿에서 부모 레이아웃을 상속하려면 어떻게 해야 하나요? **답변** @extends('layouts.app') 디렉티브를 사용하면 자식 템플릿이 부모 레이아웃을 상속할 수 있습니다. 이것은 Blade 파일의 첫 번째 줄이어야 합니다. 그런 다음 부모 레이아웃에서 @yield로 선언된 섹션의 내용을 정의하기 위해 @section을 사용합니다. ## 15개 추가 질문 이용 가능 - 부모 레이아웃에서 자식 템플릿이 채울 자리 표시자를 정의하는 Blade 디렉티브는 무엇인가요? - 템플릿에 부분 Blade 파일을 포함하려면 어떻게 해야 하나요? 무료로 가입하기: https://sharpskill.dev/ko/login ## 기타 Laravel 면접 주제 - [PHP 기초](https://sharpskill.dev/ko/technologies/laravel/interview-questions/php-basics.md): 25개 질문, Junior - [PHP 객체지향 기초](https://sharpskill.dev/ko/technologies/laravel/interview-questions/php-oop-essentials.md): 20개 질문, Junior - [Composer & Autoloading](https://sharpskill.dev/ko/technologies/laravel/interview-questions/composer-autoloading.md): 18개 질문, Junior - [Laravel 기초](https://sharpskill.dev/ko/technologies/laravel/interview-questions/laravel-fundamentals.md): 20개 질문, Junior - [Laravel 라우팅](https://sharpskill.dev/ko/technologies/laravel/interview-questions/laravel-routing.md): 20개 질문, Junior - [Request & Response](https://sharpskill.dev/ko/technologies/laravel/interview-questions/request-response.md): 20개 질문, Junior - [Eloquent ORM 기초](https://sharpskill.dev/ko/technologies/laravel/interview-questions/eloquent-orm-basics.md): 22개 질문, Junior - [Eloquent Relationships](https://sharpskill.dev/ko/technologies/laravel/interview-questions/eloquent-relationships.md): 25개 질문, Mid-Level - [Migrations & Schema Builder](https://sharpskill.dev/ko/technologies/laravel/interview-questions/database-migrations.md): 20개 질문, Mid-Level - [유효성 검사와 폼](https://sharpskill.dev/ko/technologies/laravel/interview-questions/validation-forms.md): 22개 질문, Mid-Level - [인증](https://sharpskill.dev/ko/technologies/laravel/interview-questions/authentication.md): 20개 질문, Mid-Level - [인가와 Policies](https://sharpskill.dev/ko/technologies/laravel/interview-questions/authorization-policies.md): 18개 질문, Mid-Level - [API Resources & Authentication](https://sharpskill.dev/ko/technologies/laravel/interview-questions/api-resources-authentication.md): 26개 질문, Mid-Level - [미들웨어](https://sharpskill.dev/ko/technologies/laravel/interview-questions/middleware.md): 18개 질문, Mid-Level - [Service Container & DI](https://sharpskill.dev/ko/technologies/laravel/interview-questions/service-container-di.md): 20개 질문, Mid-Level - [Queues & Jobs](https://sharpskill.dev/ko/technologies/laravel/interview-questions/queues-jobs.md): 22개 질문, Mid-Level - [Events & Listeners](https://sharpskill.dev/ko/technologies/laravel/interview-questions/events-listeners.md): 18개 질문, Mid-Level - [알림 및 메일](https://sharpskill.dev/ko/technologies/laravel/interview-questions/notifications-mail.md): 20개 질문, Mid-Level - [File Storage](https://sharpskill.dev/ko/technologies/laravel/interview-questions/file-storage.md): 18개 질문, Mid-Level - [Testing & PHPUnit](https://sharpskill.dev/ko/technologies/laravel/interview-questions/testing-phpunit.md): 24개 질문, Mid-Level - [Caching](https://sharpskill.dev/ko/technologies/laravel/interview-questions/caching.md): 18개 질문, Mid-Level - [Livewire & Inertia](https://sharpskill.dev/ko/technologies/laravel/interview-questions/livewire-inertia.md): 20개 질문, Mid-Level - [Eloquent Advanced](https://sharpskill.dev/ko/technologies/laravel/interview-questions/eloquent-advanced.md): 24개 질문, Senior - [Repository Pattern](https://sharpskill.dev/ko/technologies/laravel/interview-questions/repository-pattern.md): 20개 질문, Senior - [Laravel 패키지](https://sharpskill.dev/ko/technologies/laravel/interview-questions/laravel-packages.md): 20개 질문, Senior - [Performance Optimization](https://sharpskill.dev/ko/technologies/laravel/interview-questions/performance-optimization.md): 22개 질문, Senior - [Security Best Practices](https://sharpskill.dev/ko/technologies/laravel/interview-questions/security-best-practices.md): 22개 질문, Senior - [Laravel Octane](https://sharpskill.dev/ko/technologies/laravel/interview-questions/laravel-octane.md): 18개 질문, Senior - [Laravel Distributed Systems](https://sharpskill.dev/ko/technologies/laravel/interview-questions/laravel-distributed-systems.md): 22개 질문, Senior - [Observability & Monitoring](https://sharpskill.dev/ko/technologies/laravel/interview-questions/observability-monitoring.md): 20개 질문, Senior - [Deployment & DevOps](https://sharpskill.dev/ko/technologies/laravel/interview-questions/deployment-devops.md): 20개 질문, Senior --- Source: SharpSkill (https://sharpskill.dev), tech interview preparation for your real stack. HTML version of this page: https://sharpskill.dev/ko/technologies/laravel/interview-questions/blade-templates