Merge pull request #4781 from dhensby/pulls/anchor-fix

Fixing regression from #4733
This commit is contained in:
Loz Calver 2015-11-18 14:41:28 +00:00
commit 071314fbf2

View File

@ -578,7 +578,7 @@ class HtmlEditorField_Toolbar extends RequestHandler {
// Similar to the regex found in HtmlEditorField.js / getAnchors method.
if (preg_match_all("/\s(name|id)=\"([^\"]+?)\"|\s(name|id)='([^']+?)'/im", $page->Content, $matches)) {
$anchors = $matches[1];
$anchors = array_filter(array_merge($matches[2], $matches[4]));
}
} else {