Remove carrier formatting cruft from tracking details
This commit is contained in:
parent
c4e9ada93a
commit
521b15835c
@ -18,6 +18,20 @@ class TrackingEntry {
|
|||||||
$this->location = $location;
|
$this->location = $location;
|
||||||
}
|
}
|
||||||
$this->iscontainerscan = $iscontainerscan;
|
$this->iscontainerscan = $iscontainerscan;
|
||||||
|
$this->formatDetails();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Do some find/replace on the event details to clean up some carrier formatting nonsense.
|
||||||
|
*/
|
||||||
|
private function formatDetails() {
|
||||||
|
$findreplace = [
|
||||||
|
"<SUP>®</SUP>" => "®"
|
||||||
|
];
|
||||||
|
|
||||||
|
foreach ($findreplace as $f => $r) {
|
||||||
|
$this->details = str_replace($f, $r, $this->details);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public function toString(): string {
|
public function toString(): string {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user