-
Notifications
You must be signed in to change notification settings - Fork 2
/
e_parse.php
62 lines (47 loc) · 979 Bytes
/
e_parse.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
<?php
/*
* e107 website system
*
* Copyright (C) 2008-2010 e107 Inc (e107.org)
* Released under the terms and conditions of the
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
*
*
*
* $Source: /cvs_backup/e107_0.8/e107_plugins/linkwords/e_tohtml.php,v $
* $Revision$
* $Date$
* $Author$
*/
if ( ! defined('e107_INIT')) {
exit;
}
require __DIR__ . '/NoFollow.php';
class nofollow_parse extends NoFollow
{
/**
* e107 HTML parser routine callee
*
* @param string $text html/text to be processed.
* @param string $context current text parse context
*
* @return string
* @access public
*/
public function toHtml($text, $context = '')
{
if (
$this->Active &&
! $this->isAdminArea() &&
! $this->isExcludePage() &&
$this->isInContext($context)
) {
$method = $this->parseMethod;
if (method_exists($this, $method)) {
$text = $this->$method($text);
return $text;
}
}
return $text;
}
}