Skip to content

Commit 0cec80c

Browse files
fix: remove spaces before exploding to avoid errors with HTMLSanitizer
1 parent c5dd025 commit 0cec80c

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

phpmyfaq/src/phpMyFAQ/Configuration.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -515,7 +515,7 @@ public function replaceMainReferenceUrl(string $oldUrl, string $newUrl): bool
515515
*/
516516
public function getAllowedMediaHosts(): array
517517
{
518-
return explode(',', $this->get('records.allowedMediaHosts'));
518+
return explode(',', trim($this->get('records.allowedMediaHosts')));
519519
}
520520

521521
public function getCustomCss(): string

phpmyfaq/src/phpMyFAQ/Session.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@ public function checkSessionId(int $sessionIdToCheck, string $ipAddress): void
270270
*/
271271
private function getBotIgnoreList(): array
272272
{
273-
return explode(',', (string) $this->configuration->get('main.botIgnoreList'));
273+
return explode(',', trim((string) $this->configuration->get('main.botIgnoreList')));
274274
}
275275

276276
/**

0 commit comments

Comments
 (0)