Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Description box adding paragraph tags to everything #1607

Closed
samhamilton opened this Issue · 3 comments

2 participants

@samhamilton

The default behaviour of description box is to add a paragraph tags to everything including other HTML code.

Text saved in the Description Box:

<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus a ligula leo. Proin eu arcu at ipsum dapibus ullamcorper. Pellentesque egestas orci nec magna condimentum luctus. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Ut ac ante et mauris bibendum ultricies non sed massa. Fusce facilisis dui eget lacus scelerisque eget aliquam urna ultricies. Duis et rhoncus quam. Praesent tellus nisi, ultrices sed iaculis quis, euismod interdum ipsum.</p>
<ul>
<li>Lorem ipsum dolor sit amet</li>
<li>Lorem ipsum dolor sit amet</li>
<li>Lorem ipsum dolor sit amet</li>
<li>Lorem ipsum dolor sit amet</li>
<li>Lorem ipsum dolor sit amet</li>
</ul>

Output on the website:

<div itemprop="description" data-hook="description">
          <p><p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus a ligula leo. Proin eu arcu at ipsum dapibus ullamcorper. Pellentesque egestas orci nec magna condimentum luctus. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Ut ac ante et mauris bibendum ultricies non sed massa. Fusce facilisis dui eget lacus scelerisque eget aliquam urna ultricies. Duis et rhoncus quam. Praesent tellus nisi, ultrices sed iaculis quis, euismod interdum ipsum.</p>
</p>
<p><ul>
</p>
<p><li>Lorem ipsum dolor sit amet</li>
</p>
<p><li>Lorem ipsum dolor sit amet</li>
</p>
<p><li>Lorem ipsum dolor sit amet</li>
</p>
<p><li>Lorem ipsum dolor sit amet</li>
</p>
<p><li>Lorem ipsum dolor sit amet</li>
</p>
<p></ul></p>
        </div>
@radar
Collaborator

This is happening due to how the product_description method is defined in Spree::ProductsHelper. Let me see if I can fix that up for you.

@radar radar closed this issue from a commit
@radar radar Wrap product descriptions in paragraph tags only when there's a line
followed by two line breaks.

Fixes #1607
3e1a219
@radar radar closed this in 3e1a219
@radar
Collaborator

This should be now fixed on 1-1-stable and master. Please try it out and let us know.

@samhamilton

Thanks that looks to have done the job

Cheers
Sam

@tvdeyen tvdeyen referenced this issue from a commit in magiclabs/spree
@radar radar Wrap product descriptions in paragraph tags only when there's a line
followed by two line breaks.

Fixes #1607
63c8839
@GeekOnCoffee GeekOnCoffee referenced this issue from a commit in GeekOnCoffee/spree
@radar radar Wrap product descriptions in paragraph tags only when there's a line
followed by two line breaks.

Fixes #1607
091546a
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.