dev와 composer 버전 일치
This commit is contained in:
+26
-6
@@ -1,11 +1,16 @@
|
||||
# HTML5 Definitions for HTML Purifier
|
||||
|
||||

|
||||
[](https://travis-ci.org/xemlock/htmlpurifier-html5)
|
||||
[](https://coveralls.io/github/xemlock/htmlpurifier-html5?branch=master)
|
||||
[](https://packagist.org/packages/xemlock/htmlpurifier-html5)
|
||||
[](https://packagist.org/packages/xemlock/htmlpurifier-html5)
|
||||
[](https://packagist.org/packages/xemlock/htmlpurifier-html5/stats)
|
||||
[](https://packagist.org/packages/xemlock/htmlpurifier-html5)
|
||||
|
||||
This library provides HTML5 element definitions for [HTMLPurifier](http://htmlpurifier.org/).
|
||||
This library provides HTML5 element definitions for [HTML Purifier](https://github.com/ezyang/htmlpurifier).
|
||||
|
||||
It is the most complete HTML5-compliant solution among all based on HTML Purifier. Apart from providing the most extensive set of element definitions, it provides tidy/sanitization rules for transforming the input into a valid HTML5 output.
|
||||
|
||||
|
||||
## Installation
|
||||
|
||||
@@ -15,6 +20,7 @@ Install with [Composer](https://getcomposer.org/) by running the following comma
|
||||
composer require xemlock/htmlpurifier-html5
|
||||
```
|
||||
|
||||
|
||||
## Usage
|
||||
|
||||
The most basic usage is similar to the original HTML Purifier. Create a HTML5-compatible config
|
||||
@@ -43,19 +49,33 @@ or equivalently:
|
||||
```php
|
||||
$config = HTMLPurifier_HTML5Config::createDefault();
|
||||
$config->set('HTML.SafeIframe', true);
|
||||
$config->set('URI.SafeIframeRegexp', '#^//www\.youtube\.com/embed/#');
|
||||
$config->set('URI.SafeIframeRegexp', '%^//www\.youtube\.com/embed/%');
|
||||
```
|
||||
|
||||
## Configuration
|
||||
|
||||
Apart from HTML Purifier's built-in [configuration directives](http://htmlpurifier.org/live/configdoc/plain.html), the following new directives are also supported:
|
||||
|
||||
* __HTML.IframeAllowFullscreen__
|
||||
|
||||
Version added: 0.1.11\
|
||||
Type: [Boolean](http://htmlpurifier.org/live/configdoc/plain.html#type-bool)\
|
||||
Default: `false`
|
||||
|
||||
Whether or not to permit `allowfullscreen` attribute on `iframe` tags. It requires either [%HTML.SafeIframe](http://htmlpurifier.org/live/configdoc/plain.html#HTML.SafeIframe) or [%HTML.Trusted](http://htmlpurifier.org/live/configdoc/plain.html#HTML.Trusted) to be `true`.
|
||||
|
||||
|
||||
## Supported HTML5 elements
|
||||
|
||||
Aside from HTML elements supported originally by HTML Purifier, this library
|
||||
adds support for the following HTML5 elements:
|
||||
|
||||
article, aside, audio, details, figcaption, figure, footer, header, hgroup, main, nav, picture, section, source, summary, time, track, video
|
||||
`<article>`, `<aside>`, `<audio>`, `<bdi>`, `<details>`, `<dialog>`, `<figcaption>`, `<figure>`, `<footer>`, `<header>`, `<hgroup>`, `<main>`, `<mark>`, `<nav>`, `<picture>`, `<progress>`, `<section>`, `<source>`, `<summary>`, `<time>`, `<track>`, `<video>`, `<wbr>`
|
||||
|
||||
### Elements not (yet) supported
|
||||
as well as HTML5 attributes added to existing HTML elements, such as:
|
||||
|
||||
`<a>`, `<del>`, `<fieldset>`, `<ins>`, `<script>`
|
||||
|
||||
dialog, menu, menuitem, progress
|
||||
|
||||
## License
|
||||
|
||||
|
||||
Reference in New Issue
Block a user