Skip to content
This repository has been archived by the owner on Sep 8, 2020. It is now read-only.

Commit

Permalink
Merge pull request #14 from oceanapplications/master
Browse files Browse the repository at this point in the history
Added linebreaks
  • Loading branch information
asgrim committed Dec 11, 2015
2 parents 7aa660d + d3b7f32 commit 7652efe
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/OfxParser/Parser.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ public function loadFromFile($ofxFile)
public function loadFromString($ofxContent)
{
$ofxContent = utf8_encode($ofxContent);

$ofxContent = str_replace("<", "\n<", $ofxContent); //add linebreaks to allow XML to parse

$sgmlStart = stripos($ofxContent, '<OFX>');
$ofxHeader = trim(substr($ofxContent, 0, $sgmlStart));
$ofxSgml = trim(substr($ofxContent, $sgmlStart));
Expand Down Expand Up @@ -115,4 +116,4 @@ private function convertSgmlToXml($sgml)

return trim($xml);
}
}
}

0 comments on commit 7652efe

Please sign in to comment.