cakephp3 metaタグ linkタグ スラッシュ削除

・headタグ内

<?= $this->Html->meta(['http-equiv' => 'X-UA-Compatible', 'content' => 'IE=edge'])."\n" ?>
<?= $this->Html->meta(['name' => 'viewport', 'content' => 'width=device-width, initial-scale=1.0'])."\n" ?>
<?= $this->Html->css('base.css')."\n" ?>

・output

<meta http-equiv="X-UA-Compatible" content="IE=edge"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<link rel="stylesheet" href="/zenkokujiin/css/base.css"/>

・編集するファイル
\vendor\cakephp\cakephp\src\View\Helper\HtmlHelper.php

'meta' => '<meta{{attrs}}/>',
'css' => '<link rel="{{rel}}" href="{{url}}"{{attrs}}/>',

↓「/」削除

'meta' => '<meta{{attrs}}>',
'css' => '<link rel="{{rel}}" href="{{url}}"{{attrs}}>',

・output

<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="/zenkokujiin/css/base.css">
PAGE TOP