Skip to content

Commit aa1294f

Browse files
committed
Fix c/s from Fabbot.io
1 parent 27280b1 commit aa1294f

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

Diff for: SensioLabs/AnsiConverter/AnsiToHtmlConverter.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ public function convert($text)
5353
// remove character set sequences
5454
$text = \preg_replace('#\e(\(|\))(A|B|[0-2])#', '', $text);
5555

56-
$text = \htmlspecialchars($text, PHP_VERSION_ID >= 50400 ? ENT_QUOTES | ENT_SUBSTITUTE : ENT_QUOTES, $this->charset);
56+
$text = \htmlspecialchars($text, \PHP_VERSION_ID >= 50400 ? ENT_QUOTES | ENT_SUBSTITUTE : ENT_QUOTES, $this->charset);
5757

5858
// carriage return
5959
$text = \preg_replace('#^.*\r(?!\n)#m', '', $text);

Diff for: SensioLabs/AnsiConverter/Tests/AnsiToHtmlConverterTest.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ public function getConvertDataStandardTheme()
7575
['<span style="background-color: black; color: white; text-decoration: underline">foo</span>', "\e[4mfoo\e[0m"],
7676

7777
// non valid unicode codepoints substitution (only available with PHP >= 5.4)
78-
PHP_VERSION_ID < 50400 ? ['', ''] : ['<span style="background-color: black; color: white">foo '."\xEF\xBF\xBD".'</span>', "foo \xF4\xFF\xFF\xFF"],
78+
\PHP_VERSION_ID < 50400 ? ['', ''] : ['<span style="background-color: black; color: white">foo '."\xEF\xBF\xBD".'</span>', "foo \xF4\xFF\xFF\xFF"],
7979
];
8080
}
8181

@@ -108,7 +108,7 @@ public function getConvertDataWithSolarizedTheme()
108108
['<span style="background-color: #073642; color: #eee8d5; text-decoration: underline">foo</span>', "\e[4mfoo\e[0m"],
109109

110110
// non valid unicode codepoints substitution (only available with PHP >= 5.4)
111-
PHP_VERSION_ID < 50400 ? ['', ''] : ['<span style="background-color: #073642; color: #eee8d5">foo '."\xEF\xBF\xBD".'</span>', "foo \xF4\xFF\xFF\xFF"],
111+
\PHP_VERSION_ID < 50400 ? ['', ''] : ['<span style="background-color: #073642; color: #eee8d5">foo '."\xEF\xBF\xBD".'</span>', "foo \xF4\xFF\xFF\xFF"],
112112
];
113113
}
114114

@@ -141,7 +141,7 @@ public function getConvertDataWithSolarizedXTermTheme()
141141
['<span style="background-color: #262626; color: #e4e4e4; text-decoration: underline">foo</span>', "\e[4mfoo\e[0m"],
142142

143143
// non valid unicode codepoints substitution (only available with PHP >= 5.4)
144-
PHP_VERSION_ID < 50400 ? ['', ''] : ['<span style="background-color: #262626; color: #e4e4e4">foo '."\xEF\xBF\xBD".'</span>', "foo \xF4\xFF\xFF\xFF"],
144+
\PHP_VERSION_ID < 50400 ? ['', ''] : ['<span style="background-color: #262626; color: #e4e4e4">foo '."\xEF\xBF\xBD".'</span>', "foo \xF4\xFF\xFF\xFF"],
145145
];
146146
}
147147
}

0 commit comments

Comments
 (0)