2
0
mirror of https://github.com/boostorg/website.git synced 2026-01-19 16:52:15 +00:00
Files
website/common/code/test/tests/html_encode.phpt
Daniel James 48f05b1a47 Use html_encode that handles invalid UTF-8 everywhere
Trying to view documentation with an invalid path would cause an error when it
encoded the path in the 404 error page, so rather than fix that case, just use
a safer function everywhere. Although maybe should be a bit more cautious about
displaying user supplied text?
2018-02-09 17:21:53 +00:00

10 lines
231 B
PHP
Raw Permalink Blame History

<?php
use Tester\Assert;
require_once(__DIR__.'/../config/bootstrap.php');
require_once(__DIR__.'/../../boost.php');
Assert::same('&lt;test&gt;', html_encode('<test>'));
Assert::same('<27><>', html_encode(urldecode('%A0%A0')));