FIX: fix escaping latin accents to HTML entities
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
<?php
|
||||
/**
|
||||
* Define function for escaping characters.
|
||||
*
|
||||
* This funcion prevents of creating build-in function, which escapes also accents...
|
||||
*
|
||||
* @param $value
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
function e($value)
|
||||
{
|
||||
return htmlspecialchars($value, ENT_QUOTES, 'UTF-8');
|
||||
}
|
||||
@@ -7,15 +7,14 @@
|
||||
* @author Taylor Otwell <taylorotwell@gmail.com>
|
||||
*/
|
||||
|
||||
$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';
|
||||
|
||||
@@ -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')
|
||||
|
||||
<div class="row">
|
||||
<h2>@lang('admin/contents.edit', ['name' => $page->title])</h2>
|
||||
<h2>@lang('admin/contents.edit', ['name' => e($page->title)])</h2>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
|
||||
Reference in New Issue
Block a user