Source for file Embed.php
Documentation is available at Embed.php
// $Id: Embed.php,v 1.4 2004/09/25 19:05:13 pmjones Exp $
* This class implements a Text_Wiki_Parse to embed the contents of a URL
* inside the page at render-time. Typically used to get script output.
* This differs from the 'include' rule, which incorporates results at
* parse-time; 'embed' output does not get parsed by Text_Wiki, while
* This rule is inherently not secure; it allows cross-site scripting to
* occur if the embedded output has <script> or other similar tags. Be
* @author Paul M. Jones <pmjones@ciaweb.net>
'base' => '/path/to/scripts/'
* The regular expression used to find source text matching this
var $regex = '/(\[\[embed )(.+?)( .+?)?(\]\])/i';
* Generates a token entry for the matched text. Token options are:
* 'text' => The full matched text, not including the <code></code> tags.
* @param array &$matches The array of matches from parse().
* @return A delimited token number to be used as a placeholder in
// save the file location
$this->file = $this->getConf('base', './') . $matches[2 ];
// extract attribs as variables in the local space
unset ($this->vars['this']);
// done, place the script output directly in the source
return $this->wiki->addToken (
array ('text' => $this->output)
Documentation generated on Mon, 11 Mar 2019 14:22:31 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.
|