1
0
mirror of https://github.com/e107inc/e107.git synced 2025-07-31 03:40:37 +02:00

Bugtracker #4669 - apostrophe in Site Name

This commit is contained in:
e107steved
2010-01-02 21:42:51 +00:00
parent 6a1938a314
commit 38aa26891d
2 changed files with 22 additions and 19 deletions

View File

@@ -9,8 +9,8 @@
* General purpose file * General purpose file
* *
* $Source: /cvs_backup/e107_0.8/class2.php,v $ * $Source: /cvs_backup/e107_0.8/class2.php,v $
* $Revision: 1.173 $ * $Revision: 1.174 $
* $Date: 2010-01-02 14:56:10 $ * $Date: 2010-01-02 21:42:51 $
* $Author: e107steved $ * $Author: e107steved $
* *
*/ */
@@ -743,14 +743,14 @@ function getip()
} }
// for multi-language these definitions needs to come after the language loaded. // for multi-language these definitions needs to come after the language loaded.
define('SITENAME', trim($tp->toHTML($pref['sitename'], '', 'emotes_off, defs, no_make_clickable'))); define('SITENAME', trim($tp->toHTML($pref['sitename'], '', 'TITLE,er_on')));
define('SITEBUTTON', $tp->replaceConstants($pref['sitebutton'])); define('SITEBUTTON', $tp->replaceConstants($pref['sitebutton']));
define('SITETAG', $tp->toHTML($pref['sitetag'], false, 'emotes_off, defs')); define('SITETAG', $tp->toHTML($pref['sitetag'], false, 'emotes_off,defs'));
define('SITEDESCRIPTION', $tp->toHTML($pref['sitedescription'], '', 'emotes_off, defs')); define('SITEDESCRIPTION', $tp->toHTML($pref['sitedescription'], '', 'emotes_off,defs'));
define('SITEADMIN', $pref['siteadmin']); define('SITEADMIN', $pref['siteadmin']);
define('SITEADMINEMAIL', $pref['siteadminemail']); define('SITEADMINEMAIL', $pref['siteadminemail']);
define('SITEDISCLAIMER', $tp->toHTML($pref['sitedisclaimer'], '', 'emotes_off, defs')); define('SITEDISCLAIMER', $tp->toHTML($pref['sitedisclaimer'], '', 'emotes_off,defs'));
define('SITECONTACTINFO', $tp->toHTML($pref['sitecontactinfo'], true, 'emotes_off, defs')); define('SITECONTACTINFO', $tp->toHTML($pref['sitecontactinfo'], true, 'emotes_off,defs'));
/* Withdrawn 0.8 /* Withdrawn 0.8
// legacy module.php file loading. // legacy module.php file loading.

View File

@@ -9,9 +9,9 @@
* Text processing and parsing functions * Text processing and parsing functions
* *
* $Source: /cvs_backup/e107_0.8/e107_handlers/e_parse_class.php,v $ * $Source: /cvs_backup/e107_0.8/e107_handlers/e_parse_class.php,v $
* $Revision: 1.88 $ * $Revision: 1.89 $
* $Date: 2009-12-12 11:01:04 $ * $Date: 2010-01-02 21:42:51 $
* $Author: e107coders $ * $Author: e107steved $
* *
*/ */
if (!defined('e107_INIT')) { exit(); } if (!defined('e107_INIT')) { exit(); }
@@ -55,9 +55,9 @@ class e_parse
// 'Hooked' parsers (array) // 'Hooked' parsers (array)
var $e_hook; var $e_hook;
var $search = array(''', ''', '"', 'onerror', '>', ''', '"', ' & '); var $search = array(''', ''', ''', '"', 'onerror', '>', '"', ' & ');
var $replace = array("'", "'", '"', 'one<i></i>rror', '>', "'", '"', ' &amp; '); var $replace = array("'", "'", "'", '"', 'one<i></i>rror', '>', '"', ' &amp; ');
// Set to TRUE or FALSE once it has been calculated // Set to TRUE or FALSE once it has been calculated
var $e_highlighting; var $e_highlighting;
@@ -159,7 +159,7 @@ class e_parse
// text is the 'content' of a link (A tag, etc) // text is the 'content' of a link (A tag, etc)
'LINKTEXT' => 'LINKTEXT' =>
array( array(
'nobreak'=>TRUE, 'retain_nl'=>TRUE, 'link_click' => FALSE, 'emotes_on'=>FALSE, 'hook'=>FALSE, 'defs'=>TRUE, 'parse_sc'=>TRUE 'nobreak'=>TRUE, 'retain_nl'=>TRUE, 'link_click' => FALSE, 'emotes'=>FALSE, 'hook'=>FALSE, 'defs'=>TRUE, 'parse_sc'=>TRUE
), ),
// text is used (for admin edit) without fancy conversions or html. // text is used (for admin edit) without fancy conversions or html.
'RAWTEXT' => 'RAWTEXT' =>
@@ -170,8 +170,8 @@ class e_parse
// Individual modifiers change the current context // Individual modifiers change the current context
var $e_Modifiers = array( var $e_Modifiers = array(
'emotes_off' => array('emotes_on' => FALSE), 'emotes_off' => array('emotes' => FALSE),
'emotes_on' => array('emotes_on' => TRUE), 'emotes_on' => array('emotes' => TRUE),
'no_hook' => array('hook' => FALSE), 'no_hook' => array('hook' => FALSE),
'do_hook' => array('hook' => TRUE), 'do_hook' => array('hook' => TRUE),
// New for 0.8 // New for 0.8
@@ -952,12 +952,15 @@ class e_parse
* @param string $text * @param string $text
* @param boolean $parseBB [optional] * @param boolean $parseBB [optional]
* @param string $modifiers [optional] TITLE|SUMMARY|DESCRIPTION|BODY|RAW|LINKTEXT etc. * @param string $modifiers [optional] TITLE|SUMMARY|DESCRIPTION|BODY|RAW|LINKTEXT etc.
* Comma-separated list, no spaces allowed
* first modifier must be a CONTEXT modifier, in UPPER CASE.
* subsequent modifiers are lower case - see $this->e_Modifiers for possible values
* @param mixed $postID [optional] * @param mixed $postID [optional]
* @param boolean $wrap [optional] * @param boolean $wrap [optional]
* @return string * @return string
* @todo complete the documentation of this essential method * @todo complete the documentation of this essential method
*/ */
public function toHTML($text, $parseBB = FALSE, $modifiers = '', $postID = "", $wrap = FALSE) public function toHTML($text, $parseBB = FALSE, $modifiers = '', $postID = '', $wrap = FALSE)
{ {
if($text == '') if($text == '')
{ {
@@ -979,8 +982,8 @@ class e_parse
$psm = trim($aMods[0]); $psm = trim($aMods[0]);
if (isset($this->e_SuperMods[$psm])) if (isset($this->e_SuperMods[$psm]))
{ {
// Supermodifier found - it simply overrides the default // Supermodifier found - override default values where necessary
$opts = $this->e_SuperMods[$psm]; $opts = array_merge($opts,$this->e_SuperMods[$psm]);
$opts['context'] = $psm; $opts['context'] = $psm;
unset($aMods[0]); unset($aMods[0]);
} }
@@ -989,7 +992,7 @@ class e_parse
// (there should only be one or two out of the list of possibles) // (there should only be one or two out of the list of possibles)
foreach ($aMods as $mod) foreach ($aMods as $mod)
{ {
// Slight concession to varying coding styles // Slight concession to varying coding styles - stripping spaces is a waste of CPU cycles!
$mod = trim($mod); $mod = trim($mod);
if (isset($this->e_Modifiers[$mod])) if (isset($this->e_Modifiers[$mod]))
{ {