From 951a8314b7ee58604b28e38884fe5c14027c6818 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20Kv=C3=A1=C4=8Dek?= Date: Fri, 8 Apr 2016 01:21:44 +0200 Subject: [PATCH] FIX: fix escaping latin accents to HTML entities --- app/Helpers/functions.php | 14 ++++++++++++++ index.php | 9 ++++----- resources/views/admin/content/edit.blade.php | 4 ++-- 3 files changed, 20 insertions(+), 7 deletions(-) create mode 100644 app/Helpers/functions.php diff --git a/app/Helpers/functions.php b/app/Helpers/functions.php new file mode 100644 index 00000000..5fd8b190 --- /dev/null +++ b/app/Helpers/functions.php @@ -0,0 +1,14 @@ + */ -$uri = urldecode( - parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH) -); +$uri = urldecode(parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH)); // This file allows us to emulate Apache's "mod_rewrite" functionality from the // built-in PHP web server. This provides a convenient way to test a Laravel // application without having installed a "real" web server software here. -if ($uri !== '/' && file_exists(__DIR__.'/public'.$uri)) { +if ($uri !== '/' && file_exists(__DIR__ . '/public' . $uri)) { return false; } -require_once __DIR__.'/public/index.php'; +require_once __DIR__ . '/app/Helpers/functions.php'; +require_once __DIR__ . '/public/index.php'; diff --git a/resources/views/admin/content/edit.blade.php b/resources/views/admin/content/edit.blade.php index dd7b09a8..8291fe40 100644 --- a/resources/views/admin/content/edit.blade.php +++ b/resources/views/admin/content/edit.blade.php @@ -1,11 +1,11 @@ @extends('admin.layout') -@section('pageName', @trans('admin/contents.edit', ['name' => $page->title])) +@section('pageName', @trans('admin/contents.edit', ['name' => e($page->title)])) @section('content')
-

@lang('admin/contents.edit', ['name' => $page->title])

+

@lang('admin/contents.edit', ['name' => e($page->title)])