From: Tim Düsterhus Date: Wed, 15 May 2013 19:24:37 +0000 (+0200) Subject: Properly handle CRLF in ExceptionLogViewPage X-Git-Tag: 2.0.0_Beta_1~174^2~4 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=cf121785f2fed866150a493b035c3ea987a8ba9f;p=GitHub%2FWoltLab%2FWCF.git Properly handle CRLF in ExceptionLogViewPage --- diff --git a/wcfsetup/install/files/lib/acp/page/ExceptionLogViewPage.class.php b/wcfsetup/install/files/lib/acp/page/ExceptionLogViewPage.class.php index 7c0547dcdd..8b46f8e361 100644 --- a/wcfsetup/install/files/lib/acp/page/ExceptionLogViewPage.class.php +++ b/wcfsetup/install/files/lib/acp/page/ExceptionLogViewPage.class.php @@ -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);