admin
bootstrap
classes
config
controller
datepicker
jquery
js
language
lib
old
smarty
smarty2
smarty_3
demo
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.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
shared.mb_wordwrap.php
variablefilter.htmlspecialchars.php
sysplugins
Smarty.class.php
SmartyBC.class.php
debug.tpl
COPYING.lib
README
SMARTY_2_BC_NOTES.txt
SMARTY_3.0_BC_NOTES.txt
SMARTY_3.1_NOTES.txt
change_log.txt
Smarty-2.6.28.zip
smarty-3.1.29.zip
media
mpdf
sql
survey
templates
templates_c
abmeldung.php
config.inc.php
index.php
redirect.php
51 lines
1.2 KiB
PHP
51 lines
1.2 KiB
PHP
<?php
|
|
/**
|
|
* Smarty plugin
|
|
*
|
|
* @package Smarty
|
|
* @subpackage PluginsModifierCompiler
|
|
*/
|
|
|
|
/**
|
|
* Smarty unescape modifier plugin
|
|
* Type: modifier<br>
|
|
* Name: unescape<br>
|
|
* 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];
|
|
}
|
|
}
|