Skip to content

Commit f70b3d6

Browse files
authored
Merge pull request #211 from MultiSafepay/remove-html-tags
Remove HTML tags from item name, item description in CartItem, and from order description in OrderRequest
2 parents f3c2ec5 + fa44de5 commit f70b3d6

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
55
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
66

77
## [Unreleased]
8+
- Remove html tags from item name, item description in CartItem, and from order description in OrderRequest
89

910
## [4.0.0] - 2020-09-11
1011
### Removed

src/Api/Transactions/OrderRequest/Arguments/Description.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ public function getData(): string
4545
{
4646
$this->validate();
4747

48-
return $this->description;
48+
return strip_tags($this->description);
4949
}
5050

5151
/**

src/ValueObject/CartItem.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ public static function fromData(array $data): CartItem
8585
*/
8686
public function addName(string $name): CartItem
8787
{
88-
$this->name = $name;
88+
$this->name = strip_tags($name);
8989
return $this;
9090
}
9191

@@ -167,7 +167,7 @@ public function addWeight(Weight $weight): CartItem
167167
*/
168168
public function addDescription(string $description): CartItem
169169
{
170-
$this->description = $description;
170+
$this->description = strip_tags($description);
171171
return $this;
172172
}
173173

0 commit comments

Comments
 (0)