diff --git a/lib/TrackingEntry.lib.php b/lib/TrackingEntry.lib.php index 5d73039..b98bcba 100644 --- a/lib/TrackingEntry.lib.php +++ b/lib/TrackingEntry.lib.php @@ -18,6 +18,20 @@ class TrackingEntry { $this->location = $location; } $this->iscontainerscan = $iscontainerscan; + $this->formatDetails(); + } + + /** + * Do some find/replace on the event details to clean up some carrier formatting nonsense. + */ + private function formatDetails() { + $findreplace = [ + "®" => "®" + ]; + + foreach ($findreplace as $f => $r) { + $this->details = str_replace($f, $r, $this->details); + } } public function toString(): string {