Skip to content

Commit 4570941

Browse files
committed
fix: replace config(DocTypes::class) with new DocTypes()
1 parent 1804bab commit 4570941

2 files changed

Lines changed: 5 additions & 3 deletions

File tree

system/Common.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -890,7 +890,8 @@ function redirect(?string $route = null): RedirectResponse
890890
*/
891891
function _solidus(): string
892892
{
893-
if (config(DocTypes::class)->html5 ?? false) {
893+
$docTypes = new DocTypes();
894+
if ($docTypes->html5 ?? false) {
894895
return '';
895896
}
896897

system/Typography/Typography.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -323,10 +323,11 @@ protected function protectCharacters(array $match): string
323323
*/
324324
public function nl2brExceptPre(string $str): string
325325
{
326-
$newstr = '';
326+
$newstr = '';
327+
$docTypes = new DocTypes();
327328

328329
for ($ex = explode('pre>', $str), $ct = count($ex), $i = 0; $i < $ct; $i++) {
329-
$xhtml = ! (config(DocTypes::class)->html5 ?? false);
330+
$xhtml = ! ($docTypes->html5 ?? false);
330331
$newstr .= (($i % 2) === 0) ? nl2br($ex[$i], $xhtml) : $ex[$i];
331332

332333
if ($ct - 1 !== $i) {

0 commit comments

Comments
 (0)