mirror of
https://github.com/e107inc/e107.git
synced 2025-01-17 20:58:30 +01:00
More [code] parsing work.
This commit is contained in:
parent
81bbbc99ee
commit
fdf647c8bb
@ -16,7 +16,9 @@ class bb_code extends e_bb_base
|
||||
function toDB($code_text, $parm)
|
||||
{
|
||||
$paramet = ($parm == 'inline') ? 'inline' : '';
|
||||
$code_text = htmlspecialchars($code_text, ENT_QUOTES, 'UTF-8');
|
||||
// $code_text = htmlspecialchars($code_text, ENT_QUOTES, 'UTF-8');
|
||||
// $code_text = str_replace('<','<r;',$code_text);
|
||||
$code_text = htmlentities($code_text, ENT_QUOTES, 'utf-8');
|
||||
|
||||
return $paramet ? '[code='.$paramet.']'.$code_text.'[/code]' : '[code]'.$code_text.'[/code]';
|
||||
}
|
||||
@ -77,7 +79,7 @@ class bb_code extends e_bb_base
|
||||
|
||||
$code_text = html_entity_decode($code_text, ENT_QUOTES, 'utf-8');
|
||||
$code_text = trim($code_text);
|
||||
// $code_text = htmlspecialchars($code_text, ENT_QUOTES, 'utf-8');
|
||||
$code_text = htmlspecialchars($code_text, ENT_QUOTES, 'utf-8');
|
||||
|
||||
if($parm == 'inline')
|
||||
{
|
||||
|
@ -486,8 +486,7 @@ class e_parse extends e_parser
|
||||
|
||||
if ($mod != 'pReFs') //XXX We're not saving prefs.
|
||||
{
|
||||
$data = $this->preFilter($data);
|
||||
|
||||
$data = $this->preFilter($data); // used by bb_xxx.php toDB() functions. bb_code.php toDB() allows us to properly bypass HTML cleaning below.
|
||||
|
||||
if (strip_tags($data) != $data) // html tags present.
|
||||
{
|
||||
@ -495,7 +494,6 @@ class e_parse extends e_parser
|
||||
$data = $this->cleanHtml($data); // sanitize all html.
|
||||
|
||||
$data = urldecode($data); // symptom of cleaning the HTML - urlencodes src attributes containing { and } .eg. {e_BASE}
|
||||
// if ($this->htmlAbuseFilter($data)) $no_encode = FALSE; //XXX cleanHtml() is more effective.
|
||||
}
|
||||
|
||||
if (!check_class($core_pref->get('post_html', e_UC_MAINADMIN)))
|
||||
@ -505,6 +503,7 @@ class e_parse extends e_parser
|
||||
// $data = $this->dataFilter($data);
|
||||
}
|
||||
|
||||
$data = html_entity_decode($data, ENT_QUOTES, 'utf-8'); // Prevent double-entities. Fix for [code] - see bb_code.php toDB();
|
||||
}
|
||||
|
||||
if (check_class($core_pref->get('post_html'))) /*$core_pref->is('post_html') && */
|
||||
|
@ -12,10 +12,10 @@
|
||||
<word>answer</word>
|
||||
</keywords>
|
||||
<adminLinks>
|
||||
<link url='admin_config.php' description='Configure FAQs' icon='images/icon_32.png' iconSmall='images/icon_16.png' primary='true' >LAN_PLUGIN_FAQS_NAME</link>
|
||||
<link url="admin_config.php" description="Configure FAQs" icon="images/icon_32.png" iconSmall="images/icon_16.png" primary="true" >LAN_PLUGIN_FAQS_NAME</link>
|
||||
</adminLinks>
|
||||
<siteLinks>
|
||||
<link url='{e_PLUGIN}faqs/faqs.php' description='FAQs' icon='images/icon_32.png' iconSmall='images/icon_16.png' function="faqCategories">LAN_PLUGIN_FAQS_NAME</link>
|
||||
<link url="{e_PLUGIN}faqs/faqs.php" description="FAQs" icon="images/icon_32.png" iconSmall="images/icon_16.png" function="faqCategories">LAN_PLUGIN_FAQS_NAME</link>
|
||||
</siteLinks>
|
||||
<pluginPrefs>
|
||||
<pref name="add_faq">255</pref>
|
||||
|
Loading…
x
Reference in New Issue
Block a user