mirror of
https://github.com/silverstripe/silverstripe-textextraction
synced 2024-10-22 11:06:00 +02:00
BUG Exclude meta info from SolrCell content retrieval
Was matching </str> greedily, which included too much content
This commit is contained in:
parent
9af389f51b
commit
f2c8df2348
@ -55,7 +55,7 @@ class SolrCellTextExtractor extends FileTextExtractor {
|
|||||||
$response = $request->send();
|
$response = $request->send();
|
||||||
// Use preg match to avoid SimpleXML running out of memory on large text nodes
|
// Use preg match to avoid SimpleXML running out of memory on large text nodes
|
||||||
preg_match(
|
preg_match(
|
||||||
sprintf('/\<str name\="%s"\>(.*)\<\/str\>/s', preg_quote($fileName)),
|
sprintf('/\<str name\="%s"\>(.*?)\<\/str\>/s', preg_quote($fileName)),
|
||||||
(string)$response->getBody(),
|
(string)$response->getBody(),
|
||||||
$matches
|
$matches
|
||||||
);
|
);
|
||||||
|
Loading…
Reference in New Issue
Block a user