Skip to content

Commit 85d200a

Browse files
authored
Merge pull request #2433 from hannesdorn/hotfix/AbstractPart-hyperlink
Hotfix: In headings hyperlinks are ignored. Added w:hyperlink to xpath filter
2 parents 409172c + f5f1ea3 commit 85d200a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/PhpWord/Reader/Word2007/AbstractPart.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ protected function readParagraph(XMLReader $xmlReader, DOMElement $domNode, $par
151151
} elseif ($headingDepth !== null) {
152152
// Heading or Title
153153
$textContent = null;
154-
$nodes = $xmlReader->getElements('w:r', $domNode);
154+
$nodes = $xmlReader->getElements('w:r|w:hyperlink', $domNode);
155155
if ($nodes->length === 1) {
156156
$textContent = htmlspecialchars($xmlReader->getValue('w:t', $nodes->item(0)), ENT_QUOTES, 'UTF-8');
157157
} else {

0 commit comments

Comments
 (0)