Code: Select all
// Strip links from a generated document (except the document internals; i.e. content links)
// Add into custom_config.inc.php: $tlCfg->document_generator->stripLinks = ENABLED;
// @author havlatm (20100729)
if (isset($tlCfg->document_generator->stripLinks) && $tlCfg->document_generator->stripLinks)
{
$generatedText = preg_replace('/<a href="http:[\/\w.]*">|<\/a>/i', '', $generatedText);
}
// send out the data
echo $generatedText;