Skip to content

Commit

Permalink
Error in hits markup fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
zozlak committed Dec 9, 2020
1 parent d6de4a2 commit 584d2e3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/acdhOeaw/arche/fcs/Endpoint.php
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ private function appendSearchHitXml(string $hit, SruResponse $resp,

$offset = 0;
while ($p1 = strpos($hit, self::FTS_HIT_TAG_START, $offset)) {
$xmlHit->appendChild($xmlHit->ownerDocument->createTextNode(substr($hit, $offset, $p1)));
$xmlHit->appendChild($xmlHit->ownerDocument->createTextNode(substr($hit, $offset, $p1 - $offset)));
$p2 = strpos($hit, self::FTS_HIT_TAG_END, $offset + 3);
$xmlHit->appendChild($resp->createElementNs(self::NMSP_FCS_HITS, 'hits:Hit', substr($hit, $p1 + 3, $p2 - $p1 - 3)));
$offset = $p2 + 4;
Expand Down

0 comments on commit 584d2e3

Please sign in to comment.