BUGFIX Fixed MigrateSiteTreeLinkingTask not working correctly when CLRF newlines being used

This commit is contained in:
Sean Harvey 2011-03-22 16:44:39 +13:00
parent fef7c32535
commit 01f5b3d212

View File

@ -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,