//// Merge -> revision 8290
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8295 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
+17
-1
@@ -366,7 +366,7 @@ class ValidateCore
|
||||
*/
|
||||
public static function isCleanHtml($html)
|
||||
{
|
||||
$jsEvent = 'onmousedown|onmousemove|onmmouseup|onmouseover|onmouseout|onload|onunload|onfocus|onblur|onchange|onsubmit|ondblclick|onclick|onkeydown|onkeyup|onkeypress|onmouseenter|onmouseleave';
|
||||
$jsEvent = 'onmousedown|onmousemove|onmmouseup|onmouseover|onmouseout|onload|onunload|onfocus|onblur|onchange|onsubmit|ondblclick|onclick|onkeydown|onkeyup|onkeypress|onmouseenter|onmouseleave|onerror';
|
||||
return (!preg_match('/<[ \t\n]*script/i', $html) && !preg_match('/<?.*('.$jsEvent.')[ \t\n]*=/i', $html) && !preg_match('/.*script\:/i', $html));
|
||||
}
|
||||
|
||||
@@ -675,6 +675,22 @@ class ValidateCore
|
||||
return true;
|
||||
}
|
||||
|
||||
public static function isMySQLEngine($engine)
|
||||
{
|
||||
return (in_array($engine, array('InnoDB', 'MyISAM')));
|
||||
}
|
||||
|
||||
public static function isUnixName($data)
|
||||
{
|
||||
return preg_match('/^[a-z0-9_-]+$/ui', $data);
|
||||
}
|
||||
|
||||
public static function isTablePrefix($data)
|
||||
{
|
||||
// Even if "-" is theorically allowed, it will be considered a syntax error if you do not add backquotes (`) around the table name
|
||||
return preg_match('/^[a-z0-9_]+$/ui', $data);
|
||||
}
|
||||
|
||||
/**
|
||||
* Check for standard name file validity
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user