Reputation: 7855
I have thousands of products that include the following in the longDescription field:
<ul>
<li>Some content</li>
<li><a href="link"... </li>
</ul>
Several trailing line breaks...
I'm wondering if there is a safe and effective SQL query that can remove the <li>'s
with the links in them, as well as the trailing line breaks / empty characters?
Upvotes: 0
Views: 324
Reputation: 1433
Best way might be to add a frontend model to the attribute. Create a model that extends Mage_Eav_Model_Entity_Attribute_Frontend_Abstract
and remove the HTML in the getValue()
function e.g. using strip_tags()
.
Upvotes: 1