Skip to content
Snippets Groups Projects
Commit 9b27cd4a authored by Tim Steiner's avatar Tim Steiner
Browse files

[gh-181] Merging from testing into staging

git-svn-id: file:///tmp/wdn_thm_drupal/branches/drupal-7.x/staging@901 20a16fea-79d4-4915-8869-1ea9d5ebf173
parent 9a8fb892
No related branches found
No related tags found
No related merge requests found
......@@ -576,6 +576,18 @@ class Unl_Migration_Tool
$this->_log('The file at ' . $fullPath . ' has no valid maincontentarea. Using entire body.');
$maincontentarea = $this->_get_text_between_tokens($html, '<body>', '</body>');
}
if (!$maincontentarea) {
// its possible the body tag has attributes. Check for this and filter them out.
$maincontentarea = $this->_get_text_between_tokens($html, '<body', '</body>');
// As long as we find a closing bracket before the next opening bracket, its probably safe to assume the body tag is intact.
if (strpos($maincontentarea, '>') < strpos($maincontentarea, '<')) {
$maincontentarea = trim(substr($maincontentarea, strpos($maincontentarea, '>') + 1));
// Otherwise, ignore it all. (Will be an issue if the body has no other tags, but how likely is this?)
} else {
$maincontentarea = '';
}
}
if (!$maincontentarea) {
$this->_log('The file at ' . $fullPath . ' has no valid body. Ignoring.');
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment