• Resolved RobinMiddelburg

    (@robinmiddelburg)


    Hi there,
    After the update to Woocommerce 3.2.2 the shortcode and HTML input at the category description is broken. At our website we use UX builder shortcodes to show an UX banner in the description. Therefore I needed to add some code to the functions.php:

    foreach ( array( 'pre_term_description' ) as $filter ) {
        remove_filter( $filter, 'wp_filter_kses' );
    }
     
    foreach ( array( 'term_description' ) as $filter ) {
        remove_filter( $filter, 'wp_kses_data' );
    }

    Has one of those filters/arrays changed in the WC 3.2.2 version?

    I checked the UX builder banners on a test page (https://www.comfortadvies.nl/test/) and it’s fully working, so I guess the filter has changed.

    Oh and all child theme WooCommerce files are updated as is the main theme.

    I’m really looking forward for a solution!

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Contributor Mike Jolley (a11n)

    (@mikejolley)

    There was some output sanitisation added when the descriptions are rendered. However, are you certain you were able to input the HTML in the backend before? I notice you cannot do so when using Posts > Categories and those descriptions. It should match.

    Plugin Contributor Mike Jolley (a11n)

    (@mikejolley)

    Yeah I know, because of https://github.com/woocommerce/woocommerce/issues/17509 But for terms, it should match WordPress category/term descriptions. We’ll ensure it does.

    TBH slider plugins could insert code like this in the footer rather than in content. It would be cleaner and would allow security fixes like the kses addition to remain as they should.

    dougaitken

    (@dougaitken)

    Automattic Happiness Engineer

    Hi @robinmiddelburg

    We haven’t heard back from you in a while, so I’m going to mark this as resolved – if you have any further questions, you can start a new thread.

    Thanks,

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Shortcode and HTML in category description is broken’ is closed to new replies.