mirror of
https://github.com/e107inc/e107.git
synced 2025-08-04 05:37:32 +02:00
Issue #1460 - Fix crash in parser when posting code.
This commit is contained in:
@@ -4408,7 +4408,7 @@ return;
|
|||||||
|
|
||||||
// Disable Shortcodes in pre/code
|
// Disable Shortcodes in pre/code
|
||||||
|
|
||||||
foreach($this->nodesToDisableSC as $node)
|
foreach($this->nodesToDisableSC as $key => $node)
|
||||||
{
|
{
|
||||||
$value = $node->C14N();
|
$value = $node->C14N();
|
||||||
|
|
||||||
@@ -4434,9 +4434,10 @@ return;
|
|||||||
$value = str_replace('{', '{{{', $value); // temporarily change {e_XXX} to {{{e_XXX}}}
|
$value = str_replace('{', '{{{', $value); // temporarily change {e_XXX} to {{{e_XXX}}}
|
||||||
$value = str_replace('}', '}}}', $value); // temporarily change {e_XXX} to {{{e_XXX}}}
|
$value = str_replace('}', '}}}', $value); // temporarily change {e_XXX} to {{{e_XXX}}}
|
||||||
|
|
||||||
// $value = htmlentities(htmlentities($value)); // Crashes apache.
|
$newNode = $doc->createElement($node->nodeName);
|
||||||
$node->nodeValue = $value; // Crashes apache sometimes FIXME! .
|
$newNode->nodeValue = $value;
|
||||||
|
|
||||||
|
$node->parentNode->replaceChild($newNode, $node);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@@ -1,49 +0,0 @@
|
|||||||
//<?php
|
|
||||||
/*
|
|
||||||
*//*
|
|
||||||
* Copyright e107 Inc e107.org, Licensed under GNU GPL (http://www.gnu.org/licenses/gpl.txt)
|
|
||||||
* $Id$
|
|
||||||
*
|
|
||||||
* PM icon shortcode
|
|
||||||
*/
|
|
||||||
|
|
||||||
/**
|
|
||||||
* e107 Private messenger plugin
|
|
||||||
*
|
|
||||||
* @package e107_plugins
|
|
||||||
* @subpackage pm
|
|
||||||
* @version $Id$;
|
|
||||||
*/
|
|
||||||
|
|
||||||
include_lan(e_PLUGIN.'pm/languages/'.e_LANGUAGE.'.php');
|
|
||||||
|
|
||||||
// global $sysprefs, $pm_prefs;
|
|
||||||
// $pm_prefs = $sysprefs->getArray("pm_prefs");
|
|
||||||
$pm_prefs = e107::getPlugPref('pm');
|
|
||||||
|
|
||||||
if(check_class($pm_prefs['pm_class']))
|
|
||||||
{
|
|
||||||
if(deftrue('FONTAWESOME') && deftrue('BOOTSTRAP'))
|
|
||||||
{
|
|
||||||
$img = e107::getParser()->toGlyph('fa-paper-plane','');
|
|
||||||
return "<a class='btn btn-sm btn-default' href='".e_PLUGIN_ABS."pm/pm.php?send.{$parm}'>{$img} ".LAN_PM_35."</a>";
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
if(file_exists(THEME.'forum/pm.png'))
|
|
||||||
{
|
|
||||||
$img = "<img src='".THEME_ABS."forum/pm.png' alt='".LAN_PM."' title='".LAN_PM."' style='border:0' />";
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$img = "<img src='".e_PLUGIN_ABS."pm/images/pm.png' alt='".LAN_PM."' title='".LAN_PM."' style='border:0' />";
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return "<a href='".e_PLUGIN_ABS."pm/pm.php?send.{$parm}'>{$img}</a>";
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
return '';
|
|
||||||
}
|
|
Reference in New Issue
Block a user