I am using Magento 2.3.1
This is how short description looks like in the front end. Below content is added in the product in admin:
This is the short description migrated from Magento 1<br><br>short description<br><br>• This is the point 1<br>• This is the point 2<br>• This is the point 3<br>• This is the point 4<br>• This is the point 5<br>•<b>This is the point 6</b>
I have used the below code:
<?php $short_description = strip_tags( $short_description, 'li' ); $short_description = "<ul><li>" . preg_replace( '/[\r\n]+/', '</li><li>', $short_description ) . "</li></ul>"; $short_description = str_replace('<li></li>', '', $short_description ); ?> <?= $short_description ?>
But the whole content is displayed in one
<li> tag after implementing the above code.
Now I want to add each bullet points in
<li> tags and also I want to remove
<br> tag from the content as well. how can I do this?