SOLVED: Custom tag rename after 1.10.2 upgrade

Before the upgrade, I was changing HTML tag from Div, to Select, and Span to Option.
and using attributes as normal.
Now this changes aren’t work anymore. There’s some reason to not work?

Hi @andrebeltrame,

thank you for the report.

We are aware of the issue and will provide a fix in the next version. For the time being, I suggest downgrading to the 1.10.1 version, if you need this option. Sadly, this is the only workaround for now.

Thanks for understanding.

Best regards,
M

1 Like

Hi everyone,

We’ve resolved this issue in Bricks 1.10.3 which is now available for a one-click update in your WordPress Dashboard.

Check out the full changelog here: Bricks 1.10.3 Changelog – Bricks.

The update now allows you to extend the list of allowed HTML tags using the bricks/allowed_html_tags filter, which you can read more about here: Filter: bricks/allowed_html_tags – Bricks Academy.

This change was necessary due to updates in version 1.10.2, where we aligned the allowed HTML tags with WordPress core standards, restricting certain tags like form by default.

If you’re using custom HTML tags in your WooCommerce cart, we’ve also updated the cart contents loop academy article example to include instructions about this new filter.

If you continue to experience any issues, feel free to reach out.

Best,
Charaf

1 Like

Thank you!
Just a question, how I cando for 2 tags, like ‘select’, ‘option’; ?

thanks

You can use the following code example:

add_filter( 'bricks/allowed_html_tags', function( $allowed_html_tags ) {
    // Define the custom tags to be added
    $custom_tags = ['select', 'option'];

    // Merge custom tags with the existing allowed tags
    return array_merge( $allowed_html_tags, $custom_tags );
} );

This code will allow both the select and option tags to be used in the builder.

I hope that helps!

Can you add this example to the academy as well?

1 Like

Done :white_check_mark: Filter: bricks/allowed_html_tags – Bricks Academy

1 Like

This isn’t working for me when using ‘time’

// ************ Add additional HTML tags
add_filter( 'bricks/allowed_html_tags', function( $allowed_html_tags ) {
    // Define the additional tags to be added (e.g. 'form' & 'select')
    $additional_tags = ['time', 'select'];

    // Merge additional tags with the existing allowed tags
    return array_merge( $allowed_html_tags, $additional_tags );
} );

CleanShot 2024-09-11 at 11.01.32@2x

Can you confirm it’s working for you, please?

Thanks,
Sol

Hi @SoloAnt,

I’ve tested and it works for me. I’ve put the code in the child theme. Where did you put the code?

image


Matej

1 Like

Hi @Matej I apologize that I didn’t come back to say, I got it figured out. I applied the snippet to the wrong theme… trying to move too fast.

I appreciate you taking the time to look into it and replying here. Thank you.:+1:

1 Like

Hey, no worries. Nice to hear that it’s solved now :slight_smile: