Skip to content
This repository has been archived by the owner on Apr 24, 2023. It is now read-only.

Commit

Permalink
v1.0.7
Browse files Browse the repository at this point in the history
  • Loading branch information
AlekVolsk committed Feb 17, 2021
1 parent f834e88 commit fe16d42
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
4 changes: 2 additions & 2 deletions assets/cfi.js
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ document.addEventListener('DOMContentLoaded', function () {
} else {
cfiDropArea.classList.remove('cfi-dropzone-highlight');
cfiDropArea.classList.add('alert-error');
cfiDropLabel.innerHTML = '<strong>' + xhr.status + '</strong><span>Look at the log</span>';
cfiDropLabel.innerHTML = '<strong>' + xhr.status + '</strong><span>Unknown error, look at the log</span>';
cfiDropArea.style.pointerEvents = 'auto';
cfiExportArea.style.pointerEvents = 'auto';
}
Expand Down Expand Up @@ -175,7 +175,7 @@ document.addEventListener('DOMContentLoaded', function () {
} else {
cfiDropArea.classList.remove('cfi-dropzone-highlight');
cfiDropArea.classList.add('alert-error');
cfiLabelExport.innerHTML = '<strong>' + xhr.status + '</strong><span>Look at the log</span>';
cfiLabelExport.innerHTML = '<strong>' + xhr.status + '</strong><span>Unknown error, look at the log</span>';
cfiDropArea.style.pointerEvents = 'auto';
cfiExportArea.style.pointerEvents = 'auto';
}
Expand Down
9 changes: 6 additions & 3 deletions cfi.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,11 @@

class plgSystemCfi extends CMSPlugin
{
private $BOM = "\xEF\xBB\xBF"; // UTF BOM signature
private $BOM_CP = "п»ї"; // UTF BOM signature
// UTF BOM signature
private $BOM = [
"\xEF\xBB\xBF", // UTF-8
"п»ї" // UTF-8 OO
];

private $_app;
private $_doc;
Expand Down Expand Up @@ -263,7 +266,7 @@ private function _importData()
}

// unset utf-8 bom
$content = str_replace([$this->BOM, $this->BOM_CP], '', $content);
$content = str_replace($this->BOM, '', $content);

// line separator definition
$rowDelimiter = "\r\n";
Expand Down

0 comments on commit fe16d42

Please sign in to comment.