05-21-2018, 01:39 AM
(This post was last modified: 05-21-2018, 01:44 AM by John_Betong.
Edit Reason: added link to W3.org
)
To remove the Welcome-page.php HTML validation errors and warnings;
Step #1
File: ./application/Controllers/Home.php:
Step #2
File: ./application/Views/welcome-message.php
https://validator.w3.org/
That's it a validated web page
Step #1
File: ./application/Controllers/Home.php:
PHP Code:
<?php namespace App\Controllers;
use CodeIgniter\Controller;
class Home extends Controller
{
public function index()
$tmp = crypt("a-very-long-random-text-string", 'a-personal-crypt-key');
$data['nonce'] = $tmp;
return view('welcome_message', $data);
}
}//
Step #2
File: ./application/Views/welcome-message.php
PHP Code:
// add lang="en"
<html lang="en">
// remove: {csp-style-nonce}
// replace with:
<style nonce="<?= $nonce ?>">
// add px
letter-spacing: 0.8px;
// remove from <svg ...
version="1.0"
https://validator.w3.org/
That's it a validated web page

CI4-Strict version - Updated
download and make your system directory strict