选择关联产品时 magento 简短描述自动换行问题

magento short description automatic line break issue when selecting associated product

故事:

User goes to the product page of the configurable product which has 4 dropdowns and many associated simple products. At this point the short description of the configurable product looks just like I left it in WYSIWYG. However, after the user selects any value in any of the dropdowns - additional <br> elements get added in between <li> elements.

HTML之前:

<ul>
  <li>Text1</li>
  <li>Text2</li>
  <li>Text3</li>
  <li>Text4</li>
</ul>

HTML 之后:

<ul>
  <br>
  <li>Text1</li>
  <br>
  <li>Text2</li>
  <br>
  <li>Text3</li>
  <br>
  <li>Text4</li>
  <br>
</ul>

This is a very similar issue to Magento editor automatic line break issue while adding new product, but the difference is that I have already removed the nl2br() from the view.phtml file and my issue only occurs after the value is selected in one of the dropdowns on the product page.

问题:

我调查了这个问题,发现 Magento 一直在 <p> 元素之间插入 <br> 元素,所以我想出了一个 解决方法 只有一个段落 <p> 并使用 <br> 元素 在视觉上伪造段落的概念,我自己在我想要的地方。