You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When using the Convert to Blocks option, classes are removed from headers
I have a site where I have a class on each header so that I can add an icon before it - https://wpvswp.com
When I convert the content to blocks, those classes are removed, and therefore so are the icons.
This what (part of) the content should be
<h2>WordPress.org is open source software you can use to create a beautiful website, blog, or app.</h2>
<blockquote>The community site where WordPress code is created and shared by the users. This is where you can download the source code for WordPress core, plugins and themes as well as the central location for community conversations and organization.<cite><a href="https://make.wordpress.org/marketing/2018/02/28/wordpress-jargon-glossary/">WordPress Jargon Glossary</a></cite></blockquote>
The <a href="https://wordpress.org">WordPress.org</a> software is an <a href="http://www.opensource.org/">Open Source</a> project, which means there are hundreds of people all over the world working on it. (More than most commercial platforms.) It also means you are free to use it for anything from your recipe site to a Fortune 500 web site without paying anyone a license fee. The WordPress software is released under the GPLv2 (or later) from the <a href="http://www.fsf.org/">Free Software Foundation</a>.
The <a href="https://wordpressfoundation.org">WordPress Foundation</a> is a 501(c)3 non-profit organization founded to further the mission of the WordPress open source project. The WordPress Foundation owns and oversees the trademarks for the WordPress and WordCamp names and logos.
<h3 class="dashicons-before dashicons-admin-site">Domain Name</h3>
You'll need to register your own domain name. This is the address that you enter into your browser to find your site (e.g. myawesomesite.com). Domain registration is typically renewed each year using a service such as <a href="https://www.namecheap.com/">Namecheap</a>. Domain registration typically costs anywhere from a couple of dollars per year to $30 or $40 p/yr, depending on the domain you wish to register.
<h3 class="dashicons-before dashicons-cloud">Website Hosting</h3>
To use the WordPress.org software you'll need to purchase website hosting. This is where you store all your website files and content. Like domain name registration, website hosting is typically renewed on a yearly basis although some companies also offer monthly, quarterly or 6 monthly payments. Website hosting can cost as little as $5 per month through to hundreds per month. The type of hosting will depend on the type of website you have. An eCommerce site for example, would require better (& typically more expensive) hosting than what a small brochure site would require.
<h3 class="dashicons-before dashicons-admin-tools">Setup</h3>
WordPress is well known for it's ease of installation. Most web hosts have automated systems in place to help you get WordPress installed and setup. For those that like a more hands-on approach there's easy to follow instructions for their famous <a href="https://codex.wordpress.org/Installing_WordPress#Famous_5-Minute_Installation">5-Minute Installation</a>.
This is what it looks like after converting to blocks:
<!-- wp:heading -->
<h2>WordPress.org is open source software you can use to create a beautiful website, blog, or app.</h2>
<!-- /wp:heading -->
<!-- wp:quote -->
<blockquote class="wp-block-quote"><p>The community site where WordPress code is created and shared by the users. This is where you can download the source code for WordPress core, plugins and themes as well as the central location for community conversations and organization.<a href="https://make.wordpress.org/marketing/2018/02/28/wordpress-jargon-glossary/">WordPress Jargon Glossary</a></p></blockquote>
<!-- /wp:quote -->
<!-- wp:paragraph -->
<p>The <a href="https://wordpress.org">WordPress.org</a> software is an <a href="http://www.opensource.org/">Open Source</a> project, which means there are hundreds of people all over the world working on it. (More than most commercial platforms.) It also means you are free to use it for anything from your recipe site to a Fortune 500 web site without paying anyone a license fee. The WordPress software is released under the GPLv2 (or later) from the <a href="http://www.fsf.org/">Free Software Foundation</a>.</p>
<!-- /wp:paragraph -->
<!-- wp:paragraph -->
<p>The <a href="https://wordpressfoundation.org">WordPress Foundation</a> is a 501(c)3 non-profit organization founded to further the mission of the WordPress open source project. The WordPress Foundation owns and oversees the trademarks for the WordPress and WordCamp names and logos.<br/>
</p>
<!-- /wp:paragraph -->
<!-- wp:heading {"level":3} -->
<h3>Domain Name</h3>
<!-- /wp:heading -->
<!-- wp:paragraph -->
<p>You'll need to register your own domain name. This is the address that you enter into your browser to find your site (e.g. myawesomesite.com). Domain registration is typically renewed each year using a service such as <a href="https://www.namecheap.com/">Namecheap</a>. Domain registration typically costs anywhere from a couple of dollars per year to $30 or $40 p/yr, depending on the domain you wish to register.<br/>
</p>
<!-- /wp:paragraph -->
<!-- wp:heading {"level":3} -->
<h3>Website Hosting</h3>
<!-- /wp:heading -->
<!-- wp:paragraph -->
<p>To use the WordPress.org software you'll need to purchase website hosting. This is where you store all your website files and content. Like domain name registration, website hosting is typically renewed on a yearly basis although some companies also offer monthly, quarterly or 6 monthly payments. Website hosting can cost as little as $5 per month through to hundreds per month. The type of hosting will depend on the type of website you have. An eCommerce site for example, would require better (& typically more expensive) hosting than what a small brochure site would require.<br/>
</p>
<!-- /wp:paragraph -->
<!-- wp:heading {"level":3} -->
<h3>Setup</h3>
<!-- /wp:heading -->
<!-- wp:paragraph -->
<p>WordPress is well known for it's ease of installation. Most web hosts have automated systems in place to help you get WordPress installed and setup. For those that like a more hands-on approach there's easy to follow instructions for their famous <a href="https://codex.wordpress.org/Installing_WordPress#Famous_5-Minute_Installation">5-Minute Installation</a>.<br/>
</p>
<!-- /wp:paragraph -->
When I look at the sidebar for the heading blocks, all my classes have been removed
To Reproduce
Steps to reproduce the behavior:
Edit existing content in Classic Editor to add a class to a header tag
Edit content in Gutenberg and Convert to Blocks
Notice classes have been removed
Expected behavior
My content should be convert exactly as it is without anything (e.g. classes, IDs) being removed
macOS Sierra 10.12.6
Firefox Quantum 61.0.1 (64-bit)
Gutenberg 3.3.0
The text was updated successfully, but these errors were encountered:
Thank you for your feedback. I tested with WordPress 4.9.7 and Gutenberg 3.4.0 and confirmed that class attributes are removed from headings when using "Convert to Blocks."
Closing in favor of #5028 because it has a more concise code example and because there is some pre-existing discussion around possible technical solutions.
Describe the bug
When using the Convert to Blocks option, classes are removed from headers
I have a site where I have a class on each header so that I can add an icon before it - https://wpvswp.com
When I convert the content to blocks, those classes are removed, and therefore so are the icons.
This what (part of) the content should be
This is what it looks like after converting to blocks:
When I look at the sidebar for the heading blocks, all my classes have been removed
To Reproduce
Steps to reproduce the behavior:
Expected behavior
My content should be convert exactly as it is without anything (e.g. classes, IDs) being removed
macOS Sierra 10.12.6
Firefox Quantum 61.0.1 (64-bit)
Gutenberg 3.3.0
The text was updated successfully, but these errors were encountered: