Merge branch 'master' of github.com:intarocrm/bitrix-module
This commit is contained in:
commit
f22f5d310c
@ -11,6 +11,7 @@ class ICMLLoader {
|
|||||||
public $propertiesProduct;
|
public $propertiesProduct;
|
||||||
public $application;
|
public $application;
|
||||||
public $encoding = 'utf-8';
|
public $encoding = 'utf-8';
|
||||||
|
public $defaultCharset = null;
|
||||||
|
|
||||||
protected $fp;
|
protected $fp;
|
||||||
protected $mainSection = 1000000;
|
protected $mainSection = 1000000;
|
||||||
@ -28,6 +29,8 @@ class ICMLLoader {
|
|||||||
|
|
||||||
$this->isLogged = true;
|
$this->isLogged = true;
|
||||||
|
|
||||||
|
$this->defaultCharset = LANG_CHARSET;
|
||||||
|
|
||||||
|
|
||||||
$this->PrepareSettings();
|
$this->PrepareSettings();
|
||||||
|
|
||||||
@ -80,7 +83,10 @@ class ICMLLoader {
|
|||||||
|
|
||||||
protected function PrepareValue($text)
|
protected function PrepareValue($text)
|
||||||
{
|
{
|
||||||
$newText = $this->application->ConvertCharset($text, LANG_CHARSET, $this->encoding);
|
if ($this->defaultCharset === "")
|
||||||
|
$this->defaultCharset = mb_detect_encoding($text);
|
||||||
|
|
||||||
|
$newText = $this->application->ConvertCharset($text, $this->defaultCharset, $this->encoding);
|
||||||
$newText = strip_tags($newText);
|
$newText = strip_tags($newText);
|
||||||
$newText = str_replace("&", "&", $newText);
|
$newText = str_replace("&", "&", $newText);
|
||||||
return $newText;
|
return $newText;
|
||||||
|
Loading…
Reference in New Issue
Block a user