diff options
author | Nicolas LÅ“uillet <nicolas@loeuillet.org> | 2015-01-18 20:07:46 +0100 |
---|---|---|
committer | Nicolas LÅ“uillet <nicolas@loeuillet.org> | 2015-01-18 20:07:46 +0100 |
commit | adf17b677edeb2387671f6a0f12123e7497b5938 (patch) | |
tree | 8fd87d7bf5699488ffc12afa991011e80ac1011b /inc/3rdparty/htmlpurifier/HTMLPurifier/VarParser/Native.php | |
parent | 894cd087f41d605f2f093aaad1300825f705e009 (diff) | |
download | wallabag-adf17b677edeb2387671f6a0f12123e7497b5938.tar.gz wallabag-adf17b677edeb2387671f6a0f12123e7497b5938.tar.zst wallabag-adf17b677edeb2387671f6a0f12123e7497b5938.zip |
remove 3rd libraries
Diffstat (limited to 'inc/3rdparty/htmlpurifier/HTMLPurifier/VarParser/Native.php')
-rw-r--r-- | inc/3rdparty/htmlpurifier/HTMLPurifier/VarParser/Native.php | 38 |
1 files changed, 0 insertions, 38 deletions
diff --git a/inc/3rdparty/htmlpurifier/HTMLPurifier/VarParser/Native.php b/inc/3rdparty/htmlpurifier/HTMLPurifier/VarParser/Native.php deleted file mode 100644 index c28055b5..00000000 --- a/inc/3rdparty/htmlpurifier/HTMLPurifier/VarParser/Native.php +++ /dev/null | |||
@@ -1,38 +0,0 @@ | |||
1 | <?php | ||
2 | |||
3 | /** | ||
4 | * This variable parser uses PHP's internal code engine. Because it does | ||
5 | * this, it can represent all inputs; however, it is dangerous and cannot | ||
6 | * be used by users. | ||
7 | */ | ||
8 | class HTMLPurifier_VarParser_Native extends HTMLPurifier_VarParser | ||
9 | { | ||
10 | |||
11 | /** | ||
12 | * @param mixed $var | ||
13 | * @param int $type | ||
14 | * @param bool $allow_null | ||
15 | * @return null|string | ||
16 | */ | ||
17 | protected function parseImplementation($var, $type, $allow_null) | ||
18 | { | ||
19 | return $this->evalExpression($var); | ||
20 | } | ||
21 | |||
22 | /** | ||
23 | * @param string $expr | ||
24 | * @return mixed | ||
25 | * @throws HTMLPurifier_VarParserException | ||
26 | */ | ||
27 | protected function evalExpression($expr) | ||
28 | { | ||
29 | $var = null; | ||
30 | $result = eval("\$var = $expr;"); | ||
31 | if ($result === false) { | ||
32 | throw new HTMLPurifier_VarParserException("Fatal error in evaluated code"); | ||
33 | } | ||
34 | return $var; | ||
35 | } | ||
36 | } | ||
37 | |||
38 | // vim: et sw=4 sts=4 | ||