Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
longDescription フィールドに以下を含む何千もの製品があります。
<ul> <li>Some content</li> <li><a href="link"... </li> </ul> Several trailing line breaks...
<li>'s末尾の改行/空の文字だけでなく、リンクを含むを削除できる安全で効果的な SQL クエリがあるかどうか疑問に思っています。
<li>'s
最善の方法は、属性にフロントエンド モデルを追加することです。たとえば を使用して、関数Mage_Eav_Model_Entity_Attribute_Frontend_Abstract内の HTMLを拡張および削除するモデルを作成します 。getValue()strip_tags()
Mage_Eav_Model_Entity_Attribute_Frontend_Abstract
getValue()
strip_tags()