Skip to content

Commit

Permalink
Crop HTML from product description
Browse files Browse the repository at this point in the history
  • Loading branch information
sergei-sss committed Aug 19, 2020
1 parent 00064e1 commit a06906c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Block/Autocomplete/ProductAgregator.php
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ public function getDescription()
protected function cropDescription($html)
{
$string = strip_tags($html);
$string = (strlen($string) > 50) ? $this->string->substr($string, 0, 50) . '...' : $html;
$string = (strlen($string) > 50) ? $this->string->substr($string, 0, 50) . '...' : $string;

return $string;
}
Expand Down
3 changes: 3 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,6 @@
### Version 2.1.12
- Add composer compatibility for magento 2.4
- Remove promotion from the config setting section

### Version 2.1.13
- **Fix** Crop HTML from product description in search popup
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"magento/module-search": ">=100.0.0 <102"
},
"type": "magento2-module",
"version": "2.1.12",
"version": "2.1.13",
"license": "GPL-3.0",
"authors": [
{
Expand Down

0 comments on commit a06906c

Please sign in to comment.