Menu

## Htmlaw
in package

Htmlaw.php : 37

A class wrapper for the htmLawed library.

### Table of Contents

$defaultConfig : mixed
$defaultSpec : mixed
filter() : string
  Filters a string of html with the htmLawed library.
filterRSS() : string
  Filter a string of html so that it can be put into an rss feed.

### Properties

#### $defaultConfig

Htmlaw.php : 41
`public static mixed $defaultConfig = array( 'anti_link_spam' => array('`.`', ''), 'comment' => 1, 'cdata' => 3, 'css_expression' => 1, 'deny_attribute' => 'on*', 'unique_ids' => 0, 'elements' => '*-applet-form-input-textarea-iframe-script-style-embed-object', 'keep_bad' => 1, 'schemes' => 'classid:clsid; href: aim, feed, file, ftp, gopher, http, https, irc, mailto, news, nntp, sftp, ssh, telnet; style: nil; *:file, http, https', // clsid allowed in class 'valid_xhtml' => 0, 'direct_list_nest' => 1, 'balance' => 1, )`

#### $defaultSpec

Htmlaw.php : 56
`public static mixed $defaultSpec = array('object=-classid-type, -codebase', 'embed=type(oneof=application/x-shockwave-flash)')`

### Methods

#### filter()

Htmlaw.php : 72

Filters a string of html with the htmLawed library.

`public static filter(string $html[, array<string|int, mixed>|null $config = null ][, string|array<string|int, mixed>|null $spec = null ]) : string`

##### Parameters

$html : string

  The text to filter.

$config : array<string|int, mixed>|null = null

  Config settings for the array.

$spec : string|array<string|int, mixed>|null = null

  A specification to further limit the allowed attribute values in the html.

##### Tags

see
  http://www.bioinformatics.org/phplabware/internal_utilities/htmLawed/htmLawed_README.htm

##### Return values

string —

Returns the filtered html.

#### filterRSS()

Htmlaw.php : 98

Filter a string of html so that it can be put into an rss feed.

`public static filterRSS(string $html) : string`

##### Parameters

$html : string

  The html text to fitlter.

##### Tags

see

  Htmlawed::filter().

##### Return values

string —

Returns the filtered html.

## Search results