File: basic.phpt

package info (click to toggle)
php-htmlpurifier 4.4.0%2Bdfsg1-1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 4,888 kB
  • sloc: php: 27,456; xml: 1,767; makefile: 68; sh: 14
file content (15 lines) | stat: -rw-r--r-- 332 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
--TEST--
HTMLPurifier.kses.php basic test
--FILE--
<?php
require '../library/HTMLPurifier.kses.php';
echo kses(
    '<a class="foo" style="color:#F00;" href="https://google.com">Foo<i>Bar</i>',
    array(
        'a' => array('class' => 1, 'href' => 1),
    ),
    array('http') // no https!
);

--EXPECT--
<a class="foo">FooBar</a>