auswertung
bootstrap
classes
config
controller
dashboard
datepicker
jquery
js
language
lib
old
smarty
demo
lexer
libs
plugins
block.textformat.php
function.counter.php
function.cycle.php
function.fetch.php
function.html_checkboxes.php
function.html_image.php
function.html_options.php
function.html_radios.php
function.html_select_date.php
function.html_select_time.php
function.html_table.php
function.mailto.php
function.math.php
modifier.capitalize.php
modifier.date_format.php
modifier.debug_print_var.php
modifier.escape.php
modifier.mb_wordwrap.php
modifier.regex_replace.php
modifier.replace.php
modifier.spacify.php
modifier.truncate.php
modifiercompiler.cat.php
modifiercompiler.count_characters.php
modifiercompiler.count_paragraphs.php
modifiercompiler.count_sentences.php
modifiercompiler.count_words.php
modifiercompiler.default.php
modifiercompiler.escape.php
modifiercompiler.from_charset.php
modifiercompiler.indent.php
modifiercompiler.lower.php
modifiercompiler.noprint.php
modifiercompiler.string_format.php
modifiercompiler.strip.php
modifiercompiler.strip_tags.php
modifiercompiler.to_charset.php
modifiercompiler.unescape.php
modifiercompiler.upper.php
modifiercompiler.wordwrap.php
outputfilter.trimwhitespace.php
shared.escape_special_chars.php
shared.literal_compiler_param.php
shared.make_timestamp.php
shared.mb_str_replace.php
shared.mb_unicode.php
variablefilter.htmlspecialchars.php
sysplugins
Autoloader.php
Smarty.class.php
SmartyBC.class.php
bootstrap.php
debug.tpl
CHANGELOG.md
COMPOSER_RELEASE_NOTES.txt
INHERITANCE_RELEASE_NOTES.txt
LICENSE
NEW_FEATURES.txt
README
README.md
SMARTY_2_BC_NOTES.txt
SMARTY_3.0_BC_NOTES.txt
SMARTY_3.1_NOTES.txt
composer.json
expectException
smarty2
smarty_3
Smarty-2.6.28.zip
smarty-3.1.29.zip
media
selfregistration
sql
survey
templates
test
tinymce
.gitignore
config.inc.php
todo.txt
45 lines
1.2 KiB
PHP
45 lines
1.2 KiB
PHP
<?php
|
|
/**
|
|
* Smarty plugin
|
|
*
|
|
* @package Smarty
|
|
* @subpackage PluginsModifierCompiler
|
|
*/
|
|
/**
|
|
* Smarty unescape modifier plugin
|
|
* Type: modifier
|
|
* Name: unescape
|
|
* Purpose: unescape html entities
|
|
*
|
|
* @author Rodney Rehm
|
|
*
|
|
* @param array $params parameters
|
|
*
|
|
* @return string with compiled code
|
|
*/
|
|
function smarty_modifiercompiler_unescape($params)
|
|
{
|
|
if (!isset($params[ 1 ])) {
|
|
$params[ 1 ] = 'html';
|
|
}
|
|
if (!isset($params[ 2 ])) {
|
|
$params[ 2 ] = '\'' . addslashes(Smarty::$_CHARSET) . '\'';
|
|
} else {
|
|
$params[ 2 ] = "'{$params[ 2 ]}'";
|
|
}
|
|
switch (trim($params[ 1 ], '"\'')) {
|
|
case 'entity':
|
|
case 'htmlall':
|
|
if (Smarty::$_MBSTRING) {
|
|
return 'mb_convert_encoding(' . $params[ 0 ] . ', ' . $params[ 2 ] . ', \'HTML-ENTITIES\')';
|
|
}
|
|
return 'html_entity_decode(' . $params[ 0 ] . ', ENT_NOQUOTES, ' . $params[ 2 ] . ')';
|
|
case 'html':
|
|
return 'htmlspecialchars_decode(' . $params[ 0 ] . ', ENT_QUOTES)';
|
|
case 'url':
|
|
return 'rawurldecode(' . $params[ 0 ] . ')';
|
|
default:
|
|
return $params[ 0 ];
|
|
}
|
|
}
|