1
0
mirror of https://github.com/e107inc/e107.git synced 2025-07-31 11:50:30 +02:00

Issue #258 - Should help back-slashes issue

This commit is contained in:
Cameron
2013-05-07 03:44:12 -07:00
parent 77ac20371f
commit d2a448c184

View File

@@ -153,7 +153,7 @@ class e_parse extends e_parser
// text is user-entered (i.e. untrusted)'body' or 'bulk' text (e.g. custom page body, content body) // text is user-entered (i.e. untrusted)'body' or 'bulk' text (e.g. custom page body, content body)
'USER_BODY' => 'USER_BODY' =>
array( array(
'constants'=>'full', 'scripts' => FALSE 'constants'=>'full', 'scripts' => FALSE, 'nostrip'=>FALSE
), ),
// text is 'body' of email or similar - being sent 'off-site' so don't rely on server availability // text is 'body' of email or similar - being sent 'off-site' so don't rely on server availability
'E_BODY' => 'E_BODY' =>
@@ -538,7 +538,7 @@ class e_parse extends e_parser
/** /**
* Check for umatched 'dangerous' HTML tags * Check for umatched 'dangerous' HTML tags
* (these can destroy page layout where users are able to post HTML) * (these can destroy page layout where users are able to post HTML)
* * @DEPRECATED
* @param string $data * @param string $data
* @param string $tagList - if empty, uses default list of input tags. Otherwise a CSV list of tags to check (any type) * @param string $tagList - if empty, uses default list of input tags. Otherwise a CSV list of tags to check (any type)
* *
@@ -597,7 +597,7 @@ class e_parse extends e_parser
/** /**
* XXX TODO Remove this horrible thing which adds junk to a db. * @DEPRECATED XXX TODO Remove this horrible thing which adds junk to a db.
* Checks a string for potentially dangerous HTML tags, including malformed tags * Checks a string for potentially dangerous HTML tags, including malformed tags
* *
*/ */
@@ -666,7 +666,7 @@ class e_parse extends e_parser
} }
// XXX REmove ME.
private function modTag($match) private function modTag($match)
{ {
$ans = ''; $ans = '';
@@ -1342,6 +1342,11 @@ class e_parse extends e_parser
{ {
$text = strip_tags($text); $text = strip_tags($text);
} }
if (MAGIC_QUOTES_GPC == TRUE) // precaution for badly saved data.
{
$text = stripslashes($text);
}
// Make sure we have a valid count for word wrapping // Make sure we have a valid count for word wrapping