|
|
@ -8,18 +8,18 @@ |
|
|
|
namespace yii\helpers; |
|
|
|
namespace yii\helpers; |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* Purifier provides an ability to clean up HTML from any harmful code. |
|
|
|
* HtmlPurifier provides an ability to clean up HTML from any harmful code. |
|
|
|
* |
|
|
|
* |
|
|
|
* Basic usage is the following: |
|
|
|
* Basic usage is the following: |
|
|
|
* |
|
|
|
* |
|
|
|
* ```php |
|
|
|
* ```php |
|
|
|
* $my_html = Purifier::process($my_text); |
|
|
|
* echo HtmlPurifier::process($html); |
|
|
|
* ``` |
|
|
|
* ``` |
|
|
|
* |
|
|
|
* |
|
|
|
* If you want to configure it: |
|
|
|
* If you want to configure it: |
|
|
|
* |
|
|
|
* |
|
|
|
* ```php |
|
|
|
* ```php |
|
|
|
* $my_html = Purifier::process($my_text, array( |
|
|
|
* echo HtmlPurifier::process($html, array( |
|
|
|
* 'Attr.EnableID' => true, |
|
|
|
* 'Attr.EnableID' => true, |
|
|
|
* )); |
|
|
|
* )); |
|
|
|
* ``` |
|
|
|
* ``` |
|
|
@ -29,6 +29,6 @@ namespace yii\helpers; |
|
|
|
* @author Alexander Makarov <sam@rmcreative.ru> |
|
|
|
* @author Alexander Makarov <sam@rmcreative.ru> |
|
|
|
* @since 2.0 |
|
|
|
* @since 2.0 |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
class Purifier extends base\Purifier |
|
|
|
class HtmlPurifier extends base\HtmlPurifier |
|
|
|
{ |
|
|
|
{ |
|
|
|
} |
|
|
|
} |