From 01f5b3d212d82320320c55bbf68ee757b827c10f Mon Sep 17 00:00:00 2001 From: Sean Harvey Date: Tue, 22 Mar 2011 16:44:39 +1300 Subject: [PATCH] BUGFIX Fixed MigrateSiteTreeLinkingTask not working correctly when CLRF newlines being used --- tasks/MigrateSiteTreeLinkingTask.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tasks/MigrateSiteTreeLinkingTask.php b/tasks/MigrateSiteTreeLinkingTask.php index 1f2a95da7..15996903d 100755 --- a/tasks/MigrateSiteTreeLinkingTask.php +++ b/tasks/MigrateSiteTreeLinkingTask.php @@ -29,8 +29,8 @@ class MigrateSiteTreeLinkingTask extends BuildTask { $linked = DataObject::get_by_id('SiteTree', $childID); // TOOD: Replace in all HTMLText fields - $page->Content = preg_replace ( - "/href *= *([\"']?){$linked->URLSegment}\/?/i", + $page->Content = preg_replace( + "/(*ANYCRLF)href *= *([\"']?){$linked->URLSegment}\/?/i", "href=$1[sitetree_link id={$linked->ID}]", $page->Content, -1,