Properly handle CRLF in ExceptionLogViewPage
authorTim Düsterhus <timwolla@googlemail.com>
Wed, 15 May 2013 19:24:37 +0000 (21:24 +0200)
committerTim Düsterhus <timwolla@googlemail.com>
Wed, 15 May 2013 19:24:37 +0000 (21:24 +0200)
wcfsetup/install/files/lib/acp/page/ExceptionLogViewPage.class.php

index 7c0547dcdda7ff3d3ec0ce6546260daea46847cd..8b46f8e361236840ec2e142d64672aa5268a90a1 100644 (file)
@@ -103,6 +103,9 @@ class ExceptionLogViewPage extends MultipleLinkPage {
                        return;
                }
                
+               // unify newlines
+               $contents = StringUtil::unifyNewlines($contents);
+               
                // split contents
                $split = new Regex('(?:^|\n<<<<\n\n)(?:<<<<<<<<([a-f0-9]{40})<<<<\n|$)');
                $contents = $split->split($contents, Regex::SPLIT_NON_EMPTY_ONLY | Regex::CAPTURE_SPLIT_DELIMITER);