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,