Knowledge Base
Deviking Product feeds Pro

Removing HTML Formatting from Product Descriptions

WooCommerce product descriptions often contain HTML used to format content on the storefront.

For example, a product description may contain:

 
<p><strong>Comfortable everyday sneaker.</strong></p>
<p>Available in several colours.</p>
 

Some feed destinations expect a plain-text description instead of HTML markup.

Deviking Product Feeds Pro lets you remove HTML tags from individual feed fields using the Strip HTML transformation without modifying the original WooCommerce product description.


Use the Strip HTML Transform

Open:

Deviking Feeds → Feeds

Edit the required feed and go to Mapping.

Find the description field you want to clean.

For example:

 
Output Field:
description

Source:
Description
 

Set:

 
Transform:
Strip HTML
 

The HTML markup is removed when the feed value is generated.


Example

WooCommerce Description:

 
<p><strong>Comfortable everyday sneaker.</strong></p>
<p>Perfect for everyday use.</p>
 

Mapping:

 
Output Field:
description

Source:
Description

Transform:
Strip HTML
 

The feed receives the plain-text value:

 
Comfortable everyday sneaker. Perfect for everyday use.
 

The original WooCommerce description remains unchanged.


XML Example

Without HTML stripping, a description may originate from content such as:

 
<p><strong>Premium leather wallet.</strong></p>
<p>Handmade in Italy.</p>
 

With:

 
Source:
Description

Transform:
Strip HTML
 

the generated XML contains the cleaned textual value:

 
<description>Premium leather wallet. Handmade in Italy.</description>
 

CSV Example

The same transformation works with CSV feeds.

WooCommerce Description:

 
<p>Lightweight <strong>running shoe</strong> with breathable upper.</p>
 

Mapping:

 
Output Field:
description

Source:
Description

Transform:
Strip HTML
 

Generated CSV:

 
sku,description
SHOE-100,"Lightweight running shoe with breathable upper."
 

Cleaning the Short Description

Strip HTML can also be used with the WooCommerce Short Description source.

For example:

 
Output Field:
description

Source:
Short Description

Transform:
Strip HTML
 

Source:

 
<p><strong>Compact Bluetooth speaker</strong> with 12-hour battery life.</p>
 

Feed output:

 
Compact Bluetooth speaker with 12-hour battery life.
 

Description with a Fallback Source

A useful configuration is to prefer the Short Description but use the full Description when the Short Description is empty.

Configure:

 
Output Field:
description

Source:
Short Description

Fallback Source:
Description

Transform:
Strip HTML
 

The processing order is:

 
Short Description
↓
If empty, Description
↓
Strip HTML
↓
Feed output
 

This allows one mapping field to handle products that use different WooCommerce description fields.


Example with Fallback

Product A:

 
Short Description:
<p><strong>Compact coffee grinder.</strong></p>

Description:
<p>Full product description...</p>
 

Feed result:

 
Compact coffee grinder.
 

Product B:

 
Short Description:
(empty)

Description:
<p><strong>Professional coffee grinder</strong> with stainless steel blades.</p>
 

Feed result:

 
Professional coffee grinder with stainless steel blades.
 

The same Strip HTML transformation is applied regardless of whether the final value came from the primary Source or the Fallback Source.


Strip HTML vs Preserve HTML

Deviking Product Feeds Pro also provides Preserve HTML.

These transformations serve opposite purposes.

Strip HTML

Use when the destination expects plain text.

 
Source:
Description

Transform:
Strip HTML
 

Source:

 
<p><strong>Premium Jacket</strong></p>
 

Result:

 
Premium Jacket
 

Preserve HTML

Use when the destination explicitly accepts or requires formatted HTML.

 
Source:
Description

Transform:
Preserve HTML
 

The stored WooCommerce HTML is retained.

For XML feeds, preserved HTML content is handled so that the markup can remain literal in the generated XML.

Use Preserve HTML only when the receiving platform accepts HTML in that field.


Example: Plain-Text Marketplace Description

Suppose WooCommerce contains:

 
<h2>Running Shoes</h2>
<p>Designed for <strong>daily training</strong> and long-distance running.</p>
<ul>
    <li>Breathable upper</li>
    <li>Lightweight sole</li>
</ul>
 

Configure:

 
Output Field:
description

Source:
Description

Transform:
Strip HTML
 

The feed receives plain textual content without the HTML elements.

This allows the storefront to keep its formatted description while the external product feed receives a cleaner representation.


HTML Is Removed Only from the Feed

Using Strip HTML does not edit the WooCommerce product.

It does not change:

 
Product Description
Short Description
WordPress database content
Storefront formatting
Other feeds
 

For example, WooCommerce can continue displaying:

 
<p><strong>Waterproof Jacket</strong></p>
 

while one feed exports:

 
Waterproof Jacket
 

and another feed can preserve the original HTML if required.


Different Formatting for Different Destinations

Every feed has its own Mapping configuration.

This means the same WooCommerce Description can be handled differently by different feeds.

Feed A — Plain Text

 
Source:
Description

Transform:
Strip HTML
 

Feed B — Formatted Content

 
Source:
Description

Transform:
Preserve HTML
 

You do not need to modify the WooCommerce product to satisfy different destination requirements.


Combining Strip HTML with Prefix or Suffix

Prefix and Suffix are processed after the transformation.

For example:

 
Source:
Description

Transform:
Strip HTML

Prefix:
Product information: 
 

Source:

 
<p><strong>Premium leather wallet.</strong></p>
 

After Strip HTML:

 
Premium leather wallet.
 

Final output:

 
Product information: Premium leather wallet.
 

The normal Mapping processing order is:

 
Source
↓
Fallback Source if required
↓
Transform
↓
Prefix / Suffix
↓
Feed output
 

Strip HTML and Character Limits

Deviking Product Feeds Pro also provides a Limit characters transformation for fields where a destination imposes a maximum text length.

However, each Mapping row uses one Transform at a time.

Therefore:

 
Strip HTML
 

and:

 
Limit characters
 

are separate transformation choices.

Choose the transformation that is most important for the destination’s required format.


When to Use Strip HTML

Use Strip HTML for fields where the destination expects clean plain text, particularly:

 
Description
Short Description
Product titles containing markup
Custom text/meta fields containing HTML
Other textual product data containing markup
 

A common setup is:

 
Output Field:
description

Source:
Description

Transform:
Strip HTML
 

When to Use Preserve HTML

Use Preserve HTML only when the destination supports formatted content.

For example:

 
Output Field:
description

Source:
Description

Transform:
Preserve HTML
 

This can be useful for systems that explicitly allow elements such as:

 
<p>
<strong>
<br>
<ul>
<li>
 

Always follow the receiving platform’s feed specification.


Preview the Cleaned Description

Before generating the final feed:

  1. Edit the feed.
  2. Open Mapping.
  3. Set the description Source.
  4. Select Strip HTML.
  5. Save the feed.
  6. Run Preview.
  7. Check several products with formatted descriptions.
  8. Confirm that the resulting value is suitable for the destination.
  9. Run Validate Feed.
  10. Use Save & Generate when the result is correct.

Recommended Configuration

For a straightforward plain-text product description:

 
Output Field:
description

Source:
Description

Transform:
Strip HTML
 

For stores where some products use Short Description and others use Description:

 
Output Field:
description

Source:
Short Description

Fallback Source:
Description

Transform:
Strip HTML
 

For a destination that accepts HTML:

 
Output Field:
description

Source:
Description

Transform:
Preserve HTML
 

Using the appropriate transformation lets each feed control whether WooCommerce description formatting is removed or preserved without changing the content displayed on your store.