diff --git a/sites/all/modules/unl/unl_migration.php b/sites/all/modules/unl/unl_migration.php index abb76427e13fe13196ca325aec1ef329bc9efafe..b2bbc16eaa31f130d3c972b6d4a17dcfd4148f16 100644 --- a/sites/all/modules/unl/unl_migration.php +++ b/sites/all/modules/unl/unl_migration.php @@ -748,10 +748,24 @@ class Unl_Migration_Tool $content_start + strlen($start_token), $content_end - $content_start - strlen($start_token)); $content = trim($content); - if (!$content || $content_start === FALSE || $content_end === FALSE) { - return FALSE; + if ($content && $content_start !== FALSE && $content_end !== FALSE) { + return $content; } - return $content; + + $start_token = '<!-- TemplateBeginEditable name="' . $name . '" -->'; + $end_token = '<!-- TemplateEndEditable -->'; + + $content_start = strpos($html, $start_token); + $content_end = strpos($html, $end_token, $content_start); + $content = substr($html, + $content_start + strlen($start_token), + $content_end - $content_start - strlen($start_token)); + $content = trim($content); + if ($content && $content_start !== FALSE && $content_end !== FALSE) { + return $content; + } + + return FALSE; } }