Source for file Embed.php
Documentation is available at Embed.php
// $Id: Embed.php,v 1.1 2004/06/06 15:44:34 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
$file = $this->getConf('base') . $matches[2 ];
return $this->wiki->addToken ($this->rule, $options);
Documentation generated on Mon, 11 Mar 2019 10:17:16 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.
|