Title: Using HTML script
Last modified: December 19, 2025

---

# Using HTML script

 *  Resolved [glov](https://wordpress.org/support/users/glov/)
 * (@glov)
 * [5 months, 3 weeks ago](https://wordpress.org/support/topic/using-html-2/)
 * Hello,
 * I try to display a 3D model (*.glb) using google’s model viewer inside a product
   tab. However, after inserting the code into the text editor, all <script> and
   <model-viewer> tags and their contents get removed when saving the product. Enabling/
   disabling the plugin setting “Use custom content rendering” doesn’t seem to have
   an effect. The code itself works fine if used in the default product description
   field or any other page.
 * Is there a way to enable using scripts or the google model viewer inside tabs
   or is there another way to display 3D models inside a tab?
 * Thank you for your help.
    -  This topic was modified 5 months, 3 weeks ago by [glov](https://wordpress.org/support/users/glov/).

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

 *  Plugin Support [Barn2 Plugin Support](https://wordpress.org/support/users/barn2pluginsupport/)
 * (@barn2pluginsupport)
 * [5 months, 2 weeks ago](https://wordpress.org/support/topic/using-html-2/#post-18764063)
 * Hi, [@glov](https://wordpress.org/support/users/glov/) .
 * Thanks for asking!
 * Given that your code works in the main product description but is removed in 
   the tab editor, the tab field is likely sanitizing disallowed tags.
 * A few options to consider based on our guidance:
    - Add the 3D model in the product description (where you confirmed it works)
      and keep the tab for supporting text only.
    - If your theme or another plugin provides shortcodes that render the 3D viewer,
      you could place a shortcode in the tab. Our docs suggest using shortcodes 
      to add more complex content in tabs: [https://barn2.com/kb/product-tabs-page-builders/](https://barn2.com/kb/product-tabs-page-builders/)
    - If your 3D viewer can be embedded via iframe, you can try embedding the iframe
      HTML in the tab instead of script tags. This works in most cases.
 * I will consult this with our development team as well.
   I’ll keep you posted.Best
   regards,Adrian
 *  Plugin Support [Barn2 Plugin Support](https://wordpress.org/support/users/barn2pluginsupport/)
 * (@barn2pluginsupport)
 * [5 months, 2 weeks ago](https://wordpress.org/support/topic/using-html-2/#post-18764092)
 * Hi, [@glov](https://wordpress.org/support/users/glov/) .
 * Thanks for waiting!
 * According to our developer, it should work find, as it’s working fine on their
   end, and they can see the result on the front end:
    - [Backend view](https://prnt.sc/33j2JBtjOfHE)
    - [Frontend view](https://prnt.sc/zXovTltcVb3L)
 * They suspect the issue may be due to the user role not having permission to add
   those tags, or a third-party plugin/security setting stripping them. They suggest
   testing by adding the script tag in a standard post or product. 
   Please let me
   know if this works for you.Best regards,Adrian
 *  Thread Starter [glov](https://wordpress.org/support/users/glov/)
 * (@glov)
 * [5 months ago](https://wordpress.org/support/topic/using-html-2/#post-18780527)
 * Thank you for your help.
 * Using the plugin “Code Snippets” solved the issue. Using php code that loads 
   google’s 3D model viewer in a snippet and then inserting the generated shortcode
   inside the product’s custom tab enabled displaying the model there.
 * Best regards.
 *  Plugin Support [Barn2 Plugin Support](https://wordpress.org/support/users/barn2pluginsupport/)
 * (@barn2pluginsupport)
 * [4 months, 4 weeks ago](https://wordpress.org/support/topic/using-html-2/#post-18781061)
 * Hello, [glov](https://wordpress.org/support/users/glov/) (@glov).
 * Thanks for the update. Well done for coming up with that workaround, by using
   the Code Snippets plugin to generate a shortcode that renders the 3D model viewer.
 * Please let me know if there’s anything else that we may assist you with.
 * Best regards, 
   Edge

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

You must be [logged in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fusing-html-2%2F%3Foutput_format%3Dmd&locale=en_US)
to reply to this topic.

 * ![](https://ps.w.org/woocommerce-product-tabs/assets/icon-256x256.png?rev=3019157)
 * [Product Tabs for WooCommerce](https://wordpress.org/plugins/woocommerce-product-tabs/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/woocommerce-product-tabs/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/woocommerce-product-tabs/)
 * [Active Topics](https://wordpress.org/support/plugin/woocommerce-product-tabs/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/woocommerce-product-tabs/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/woocommerce-product-tabs/reviews/)

## Tags

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

 * 4 replies
 * 2 participants
 * Last reply from: [Barn2 Plugin Support](https://wordpress.org/support/users/barn2pluginsupport/)
 * Last activity: [4 months, 4 weeks ago](https://wordpress.org/support/topic/using-html-2/#post-18781061)
 * Status: resolved