Title: HTML Attribute Values
Last modified: December 8, 2016

---

# HTML Attribute Values

 *  Resolved [Sharron Denice](https://wordpress.org/support/users/sharrondenice/)
 * (@sharrondenice)
 * [9 years, 5 months ago](https://wordpress.org/support/topic/html-attribute-values/)
 * I am using your plugin and I would like to include HTML in my attribute values,
   is this possible? If not, can the plugin be hooked into to stop it from stripping
   html values? Thanks

Viewing 6 replies - 1 through 6 (of 6 total)

 *  Plugin Author [isabel104](https://wordpress.org/support/users/isabel104/)
 * (@isabel104)
 * [9 years, 5 months ago](https://wordpress.org/support/topic/html-attribute-values/#post-8529390)
 * This plugin doesn’t handle the saving of the attributes, it only shows them. 
   WooCommerce strips the HTML, but there is a work around. You can use HTML Character
   Entities to get some HTML to show up in the value of your attributes.
 * For example, to add an HTML link, use this (change “YOUR LINK TEXT” to your own):
 * <xmp>`<a href="#">YOUR LINK TEXT</a>`</xmp>
 * Add bold text like this:
 * <xmp>`<strong>BOLD TEXT</strong>`</xmp>
 * Add an image like this (edit YOUR_IMAGE_URL.png):
 * <xmp>`<img src="http://YOUR_IMAGE_URL.png" alt="" />`</xmp>
 * Important note: If you later edit this product, the HTML will be reverted back
   to regular HTML and then when you click “Update” to update the product, the HTML
   will be stripped. So the workaround to this is, if you ever have to edit this
   product later, go through the attribute values and replace every `<` with <xmp
   >`<`</xmp>, and replace every `>` with <xmp>`>`</xmp>
    -  This reply was modified 9 years, 5 months ago by [isabel104](https://wordpress.org/support/users/isabel104/).
    -  This reply was modified 9 years, 5 months ago by [isabel104](https://wordpress.org/support/users/isabel104/).
      Reason: Trying to display HTML character entities without parsing
    -  This reply was modified 9 years, 5 months ago by [isabel104](https://wordpress.org/support/users/isabel104/).
 *  Plugin Author [isabel104](https://wordpress.org/support/users/isabel104/)
 * (@isabel104)
 * [9 years, 5 months ago](https://wordpress.org/support/topic/html-attribute-values/#post-8529445)
 * *Fix:
    Please disregard all of the <xmp> tags above. I was not to display the
   HTML Character Entities above, but basically, you can type your HTML in the attribute
   value field, but replace every `<` with its HTML character entity, which is the**&**
   symbol followed by `lt;`. Also replace every `>` with its HTML character entity,
   which which is the **&** symbol followed by `gt;`.
 *  Thread Starter [Sharron Denice](https://wordpress.org/support/users/sharrondenice/)
 * (@sharrondenice)
 * [9 years, 5 months ago](https://wordpress.org/support/topic/html-attribute-values/#post-8530123)
 * Worked like a charm!! Thanks so very much!
 *  [TWIR](https://wordpress.org/support/users/mtgarmorydotcom/)
 * (@mtgarmorydotcom)
 * [9 years, 1 month ago](https://wordpress.org/support/topic/html-attribute-values/#post-9076460)
 * Sorry for the old bump, but is there a way to just woocommerce from stripping
   the html. Earlier versions of woocommerce seemed to be fine with it.
 *  [etsythemeshop](https://wordpress.org/support/users/etsythemeshop/)
 * (@etsythemeshop)
 * [9 years, 1 month ago](https://wordpress.org/support/topic/html-attribute-values/#post-9076640)
 * [@mtgarmorydotcom](https://wordpress.org/support/users/mtgarmorydotcom/) — yes,
   but it’s very difficult. There are no actions/hooks provided by woo-commerce.
   You need to find a way to cleanly hook into wp_clean yourself and stop it from
   doing it’s thing to *just* the attributes. Good luck!
 *  [TWIR](https://wordpress.org/support/users/mtgarmorydotcom/)
 * (@mtgarmorydotcom)
 * [9 years, 1 month ago](https://wordpress.org/support/topic/html-attribute-values/#post-9078903)
 * So I got it to work on the front end. My problem now is with the back end. Looks
   like woocommerce will not allow attributes with html in them. Any clue where 
   that might be located?

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘HTML Attribute Values’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/woocommerce-show-attributes_d1b9b7.
   svg)
 * [WooCommerce Show Attributes](https://wordpress.org/plugins/woocommerce-show-attributes/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/woocommerce-show-attributes/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/woocommerce-show-attributes/)
 * [Active Topics](https://wordpress.org/support/plugin/woocommerce-show-attributes/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/woocommerce-show-attributes/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/woocommerce-show-attributes/reviews/)

## Tags

 * [attributes](https://wordpress.org/support/topic-tag/attributes/)
 * [html](https://wordpress.org/support/topic-tag/html/)

 * 6 replies
 * 4 participants
 * Last reply from: [TWIR](https://wordpress.org/support/users/mtgarmorydotcom/)
 * Last activity: [9 years, 1 month ago](https://wordpress.org/support/topic/html-attribute-values/#post-9078903)
 * Status: resolved