@@ -281,15 +281,17 @@ protected function printCodeComparisonBlock(DOMNode $node)
281281 {
282282 $ codeBlocks = $ node ->getElementsByTagName ('code ' );
283283
284- $ firstTitle = $ codeBlocks ->item (0 )->getAttribute ('title ' );
284+ $ firstTitle = trim ($ codeBlocks ->item (0 )->getAttribute ('title ' ));
285+ $ firstTitle = str_replace (' ' , ' ' , $ firstTitle );
285286 $ first = trim ($ codeBlocks ->item (0 )->nodeValue );
286287 $ first = str_replace ('<?php ' , '<?php ' , $ first );
287288 $ first = str_replace ("\n" , '</br> ' , $ first );
288289 $ first = str_replace (' ' , ' ' , $ first );
289290 $ first = str_replace ('<em> ' , '<span class="code-comparison-highlight"> ' , $ first );
290291 $ first = str_replace ('</em> ' , '</span> ' , $ first );
291292
292- $ secondTitle = $ codeBlocks ->item (1 )->getAttribute ('title ' );
293+ $ secondTitle = trim ($ codeBlocks ->item (1 )->getAttribute ('title ' ));
294+ $ secondTitle = str_replace (' ' , ' ' , $ secondTitle );
293295 $ second = trim ($ codeBlocks ->item (1 )->nodeValue );
294296 $ second = str_replace ('<?php ' , '<?php ' , $ second );
295297 $ second = str_replace ("\n" , '</br> ' , $ second );
0 commit comments