Skip to content

Commit

Permalink
remove non permitted characters #532
Browse files Browse the repository at this point in the history
  • Loading branch information
Rello committed Sep 8, 2021
1 parent 900e51f commit 4863d4f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ All notable changes to the Audio Player project will be documented in this file.
### Changed
- Event dispatcher for Add-ons
- getID3 1.9.20-202109010614
- remove non permitted characters #532

## 3.2.1 - 2021-08-20
### Fixed
Expand Down
2 changes: 1 addition & 1 deletion lib/Controller/ScannerController.php
Original file line number Diff line number Diff line change
Expand Up @@ -709,7 +709,7 @@ private function getID3Value($ID3Value, $defaultValue = null)
// \OCP\Util::writeLog('audioplayer', 'album: '.$this->ID3Tags['comments']['album'][0], \OCP\Util::DEBUG);
for ($i = 0; $i < $c; $i++) {
if (isset($this->ID3Tags['comments'][$ID3Value[$i]][0]) and rawurlencode($this->ID3Tags['comments'][$ID3Value[$i]][0]) !== '%FF%FE') {
return $this->ID3Tags['comments'][$ID3Value[$i]][0];
return preg_replace('/[\x00-\x1F\x7F\xA0]/u', '', $this->ID3Tags['comments'][$ID3Value[$i]][0]);
} elseif ($i === $c - 1 AND $defaultValue !== null) {
return $defaultValue;
} elseif ($i === $c - 1) {
Expand Down

0 comments on commit 4863d4f

Please sign in to comment.