-
Notifications
You must be signed in to change notification settings - Fork 8
/
renderer.php
87 lines (69 loc) · 2.25 KB
/
renderer.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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
<?php
class renderer_plugin_flowcharts extends Doku_Renderer_xhtml {
function underline_open() {
$xhtml = '<em class="u">';
$xhtml = htmlentities($xhtml,ENT_NOQUOTES);
$xhtml = str_replace(array('"', '='), array(''', '='), $xhtml);
$this->doc .= $xhtml;
}
function underline_close() {
$xhtml = '</em>';
$xhtml = htmlentities($xhtml,ENT_NOQUOTES);
$xhtml = str_replace(array('"', '='), array(''', '='), $xhtml);
$this->doc .= $xhtml;
}
function internallink($id, $name = null, $search = null, $returnonly = false, $linktype = 'content') {
$xhtml = parent::internallink($id, $name, $search, true, $linktype);
$xhtml = htmlentities($xhtml,ENT_NOQUOTES);
$xhtml = str_replace(array('"', '='), array(''', '='), $xhtml);
//output formatted
if($returnonly) {
return $xhtml;
} else {
$this->doc .= $xhtml;
}
}
function externallink($url, $name = null, $returnonly = false) {
$xhtml = parent::externallink($url, $name = null, true);
$xhtml = htmlentities($xhtml,ENT_NOQUOTES);
$xhtml = str_replace(array('"', '='), array(''', '='), $xhtml);
//output formatted
if($returnonly) {
return $xhtml;
} else {
$this->doc .= $xhtml;
}
}
function internalmedia($src, $title = null, $align = null, $width = null,
$height = null, $cache = null, $linking = null, $return = false) {
$xhtml = parent::internalmedia($src, $title, $align, $width, $height, $cache, $linking, true);
$xhtml = htmlentities($xhtml,ENT_NOQUOTES);
$xhtml = str_replace(array('"', '='), array(''', '='), $xhtml);
//output formatted
if($return) {
return $xhtml;
} else {
$this->doc .= $xhtml;
}
}
/**
* Render plain text data
*
* @param $text
*/
function cdata($text) {
$this->doc .= $text;
}
/**
* Open a paragraph
*/
public function p_open() {
//ignore
}
/**
* Close a paragraph
*/
public function p_close() {
//ignore
}
}