Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yii2
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
PSDI Army
yii2
Commits
5f705db1
Commit
5f705db1
authored
May 23, 2013
by
Qiang Xue
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Renamed Purifier to HtmlPurifier.
parent
e8b94755
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
25 deletions
+11
-25
composer.json
framework/composer.json
+4
-4
HtmlPurifier.php
framework/yii/helpers/HtmlPurifier.php
+4
-4
HtmlPurifier.php
framework/yii/helpers/base/HtmlPurifier.php
+3
-17
No files found.
framework/composer.json
View file @
5f705db1
...
...
@@ -72,9 +72,9 @@
"psr-0"
:
{
"yii
\\
"
:
"/"
}
},
"suggest"
:
{
"michelf/php-markdown"
:
"Required
for Markdown helper
."
,
"twig/twig"
:
"Required
for
TwigViewRenderer."
,
"smarty/smarty"
:
"Required
for
SmartyViewRenderer."
,
"ezyang/htmlpurifier"
:
"Required
for Purifier help
er."
"michelf/php-markdown"
:
"Required
by Markdown
."
,
"twig/twig"
:
"Required
by
TwigViewRenderer."
,
"smarty/smarty"
:
"Required
by
SmartyViewRenderer."
,
"ezyang/htmlpurifier"
:
"Required
by HtmlPurifi
er."
}
}
framework/yii/helpers/Purifier.php
→
framework/yii/helpers/
Html
Purifier.php
View file @
5f705db1
...
...
@@ -8,18 +8,18 @@
namespace
yii\helpers
;
/**
* Purifier provides an ability to clean up HTML from any harmful code.
*
Html
Purifier provides an ability to clean up HTML from any harmful code.
*
* Basic usage is the following:
*
* ```php
*
$my_html = Purifier::process($my_text
);
*
echo HtmlPurifier::process($html
);
* ```
*
* If you want to configure it:
*
* ```php
*
$my_html = Purifier::process($my_text
, array(
*
echo HtmlPurifier::process($html
, array(
* 'Attr.EnableID' => true,
* ));
* ```
...
...
@@ -29,6 +29,6 @@ namespace yii\helpers;
* @author Alexander Makarov <sam@rmcreative.ru>
* @since 2.0
*/
class
Purifier
extends
base\
Purifier
class
HtmlPurifier
extends
base\Html
Purifier
{
}
framework/yii/helpers/base/Purifier.php
→
framework/yii/helpers/base/
Html
Purifier.php
View file @
5f705db1
...
...
@@ -7,28 +7,14 @@
namespace
yii\helpers\base
;
/**
*
Purifier provides an ability to clean up HTML from any harmful code
.
*
HtmlPurifier is the concrete implementation of the [[yii\helpers\HtmlPurifier]] class
.
*
* Basic usage is the following:
*
* ```php
* $my_html = Purifier::process($my_text);
* ```
*
* If you want to configure it:
*
* ```php
* $my_html = Purifier::process($my_text, array(
* 'Attr.EnableID' => true,
* ));
* ```
*
* For more details please refer to HTMLPurifier documentation](http://htmlpurifier.org/).
* You should use [[yii\helpers\HtmlPurifier]] instead of this class in your application.
*
* @author Alexander Makarov <sam@rmcreative.ru>
* @since 2.0
*/
class
Purifier
class
Html
Purifier
{
public
static
function
process
(
$content
,
$config
=
null
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment