impoved the request linking options, fixed few bugs in compiler (#52)
This commit is contained in:
@ -11,7 +11,7 @@
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 2.3.6
|
||||
@build 6th March, 2017
|
||||
@build 8th March, 2017
|
||||
@created 30th April, 2015
|
||||
@package Component Builder
|
||||
@subpackage componentbuilder.php
|
||||
@ -1348,6 +1348,20 @@ abstract class ComponentbuilderHelper
|
||||
// 0nly continue if we have a string
|
||||
if (self::checkString($string))
|
||||
{
|
||||
// create file name without the extention that is safe
|
||||
if ($type === 'filename')
|
||||
{
|
||||
// make sure VDM is not in the string
|
||||
$string = str_replace('VDM', 'vDm', $string);
|
||||
// Remove anything which isn't a word, whitespace, number
|
||||
// or any of the following caracters -_()
|
||||
// If you don't need to handle multi-byte characters
|
||||
// you can use preg_replace rather than mb_ereg_replace
|
||||
// Thanks @Łukasz Rysiak!
|
||||
$string = mb_ereg_replace("([^\w\s\d\-_\(\)])", '', $string);
|
||||
// http://stackoverflow.com/a/2021729/1429677
|
||||
return preg_replace('/\s+/', ' ', $string);
|
||||
}
|
||||
// remove all other characters
|
||||
$string = trim($string);
|
||||
$string = preg_replace('/'.$spacer.'+/', ' ', $string);
|
||||
|
Reference in New Issue
Block a user