Skip to content

Commit ac42fd6

Browse files
authoredOct 2, 2018
replace mb_ with regular string functions
1 parent b6aab0a commit ac42fd6

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed
 

‎Model/Controller/ResultPlugin.php

+7-7
Original file line numberDiff line numberDiff line change
@@ -65,16 +65,16 @@ public function aroundRenderResult(
6565
$startTag = '<script';
6666
$endTag = '</script>';
6767

68-
while (false !== ($start = mb_stripos($html, $startTag))) {
69-
$end = mb_stripos($html, $endTag, $start);
68+
while (false !== ($start = stripos($html, $startTag))) {
69+
$end = stripos($html, $endTag, $start);
7070
if (false === $end) {
7171
break;
7272
}
7373

74-
$len = $end + mb_strlen($endTag) - $start;
75-
$script = mb_substr($html, $start, $len);
74+
$len = $end + strlen($endTag) - $start;
75+
$script = substr($html, $start, $len);
7676

77-
if (false !== mb_stripos($script, self::EXCLUDE_FLAG_PATTERN)) {
77+
if (false !== stripos($script, self::EXCLUDE_FLAG_PATTERN)) {
7878
continue;
7979
}
8080

@@ -83,8 +83,8 @@ public function aroundRenderResult(
8383
}
8484

8585
$scripts = implode(PHP_EOL, $scripts);
86-
if ($end = mb_stripos($html, '</body>')) {
87-
$html = mb_substr($html, 0, $end) . $scripts . substr($html, $end);
86+
if ($end = stripos($html, '</body>')) {
87+
$html = substr($html, 0, $end) . $scripts . substr($html, $end);
8888
} else {
8989
$html .= $scripts;
9090
}

0 commit comments

Comments
 (0)
Please sign in to comment.