You can not select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
			
				
					26 lines
				
				688 B
			
		
		
			
		
	
	
					26 lines
				
				688 B
			| 
								 
											13 years ago
										 
									 | 
							
								<?php
							 | 
						||
| 
								 | 
							
								/**
							 | 
						||
| 
								 | 
							
								 * @copyright Copyright (c) 2008 Yii Software LLC
							 | 
						||
| 
								 | 
							
								 * @link http://www.yiiframework.com/
							 | 
						||
| 
								 | 
							
								 * @license http://www.yiiframework.com/license/
							 | 
						||
| 
								 | 
							
								 */
							 | 
						||
| 
								 | 
							
								namespace yii\helpers\base;
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								/**
							 | 
						||
| 
								 
											13 years ago
										 
									 | 
							
								 * HtmlPurifier is the concrete implementation of the [[yii\helpers\HtmlPurifier]] class.
							 | 
						||
| 
								 
											13 years ago
										 
									 | 
							
								 *
							 | 
						||
| 
								 
											13 years ago
										 
									 | 
							
								 * You should use [[yii\helpers\HtmlPurifier]] instead of this class in your application.
							 | 
						||
| 
								 
											13 years ago
										 
									 | 
							
								 *
							 | 
						||
| 
								 | 
							
								 * @author Alexander Makarov <sam@rmcreative.ru>
							 | 
						||
| 
								 | 
							
								 * @since 2.0
							 | 
						||
| 
								 | 
							
								 */
							 | 
						||
| 
								 
											13 years ago
										 
									 | 
							
								class HtmlPurifier
							 | 
						||
| 
								 
											13 years ago
										 
									 | 
							
								{
							 | 
						||
| 
								 | 
							
									public static function process($content, $config = null)
							 | 
						||
| 
								 | 
							
									{
							 | 
						||
| 
								 | 
							
										$purifier=\HTMLPurifier::instance($config);
							 | 
						||
| 
								 | 
							
										$purifier->config->set('Cache.SerializerPath', \Yii::$app->getRuntimePath());
							 | 
						||
| 
								 | 
							
										return $purifier->purify($content);
							 | 
						||
| 
								 | 
							
									}
							 | 
						||
| 
								 | 
							
								}
							 |