Title: Button block adding extra break tag
Last modified: July 17, 2020

---

# Button block adding extra break tag

 *  Resolved [Mark Bennett](https://wordpress.org/support/users/flaboi850m/)
 * (@flaboi850m)
 * [5 years, 10 months ago](https://wordpress.org/support/topic/button-block-adding-extra-break-tag/)
 * When I use the button block it’s adding a break tag before the text.

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

 *  Plugin Author [tschortsch](https://wordpress.org/support/users/tschortsch/)
 * (@tschortsch)
 * [5 years, 10 months ago](https://wordpress.org/support/topic/button-block-adding-extra-break-tag/#post-13136981)
 * Hi [@flaboi850m](https://wordpress.org/support/users/flaboi850m/). Do you mean
   that the button gets outputted on a new line instead of inline in the previous
   text? The button gets printed on a new line on purpose. It’s actually wrapped
   in a <div> which makes it possible to align it horizontally. But you could override
   the button template by yourself if you want. See this documentation [https://github.com/liip/bootstrap-blocks-wordpress-plugin#templates](https://github.com/liip/bootstrap-blocks-wordpress-plugin#templates)
   how to do this.
 *  Thread Starter [Mark Bennett](https://wordpress.org/support/users/flaboi850m/)
 * (@flaboi850m)
 * [5 years, 10 months ago](https://wordpress.org/support/topic/button-block-adding-extra-break-tag/#post-13136989)
 * [@tschortsch](https://wordpress.org/support/users/tschortsch/) when I add the
   button text. A line break is added before the text and i can’t get rid of it.
 *  Plugin Author [tschortsch](https://wordpress.org/support/users/tschortsch/)
 * (@tschortsch)
 * [5 years, 10 months ago](https://wordpress.org/support/topic/button-block-adding-extra-break-tag/#post-13136990)
 * Can you maybe insert your block content (code from the editor) here and tell 
   me on which version of wp-bootstrap-block and WordPress you are?
 *  Thread Starter [Mark Bennett](https://wordpress.org/support/users/flaboi850m/)
 * (@flaboi850m)
 * [5 years, 10 months ago](https://wordpress.org/support/topic/button-block-adding-extra-break-tag/#post-13150749)
 * Sorry I didn’t see you had replied. The code being output is
 *     ```
       <div class="wp-bootstrap-blocks-button">
       	<a href="" class="btn btn-primary"><br>
       		Test</a>
       </div>
       ```
   
 * For some reason after the starting a tag a `br` tag is being added. I can’t find
   out where it’s getting added from.
 * I’m running WordPress 5.3.4 and Version 2.4.0 of bootstrap blocks
 *  Plugin Author [tschortsch](https://wordpress.org/support/users/tschortsch/)
 * (@tschortsch)
 * [5 years, 10 months ago](https://wordpress.org/support/topic/button-block-adding-extra-break-tag/#post-13167010)
 * Sorry I can’t reproduce this issue in a WordPress 5.3.4 demo instance.
 * Here’s my editor content:
 *     ```
       <!-- wp:wp-bootstrap-blocks/button {"text":"Test","alignment":"center"} /-->
       ```
   
 * Which results in this output:
 *     ```
       <div class="wp-bootstrap-blocks-button text-center">
       	<a href="" class="btn btn-primary">
       		Test	</a>
       </div>
       ```
   
 * Have you maybe overwritten the `button.php` template? Can you insert the exact
   content of the editor here? (`<!-- wp:wp-bootstrap-blocks/button { ... } /-->`)
 *  [peterjrees](https://wordpress.org/support/users/peterjrees/)
 * (@peterjrees)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/button-block-adding-extra-break-tag/#post-13875382)
 * I’m having the same issue… the editor content appears fine:
 * `<!-- wp:wp-bootstrap-blocks/button {"url":"https://google.com","text":"Button","
   className":"btn-lg"} /-->`
 * But the <br> appears in the rendered page (like it’s being automatically generated
   by WordPress):
 *     ```
       <div class="wp-bootstrap-blocks-button">
       	<a
       		href="https://google.com"
       						class="btn btn-lg btn-primary"
       	><br />
       		Button	</a>
       </div>
       ```
   
    -  This reply was modified 5 years, 4 months ago by [peterjrees](https://wordpress.org/support/users/peterjrees/).
    -  This reply was modified 5 years, 4 months ago by [peterjrees](https://wordpress.org/support/users/peterjrees/).
 *  [peterjrees](https://wordpress.org/support/users/peterjrees/)
 * (@peterjrees)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/button-block-adding-extra-break-tag/#post-13875445)
 * I found this was caused by the Raw HTML Pro Plugin – deactivated and the issue
   has resolved.
 *  Plugin Author [tschortsch](https://wordpress.org/support/users/tschortsch/)
 * (@tschortsch)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/button-block-adding-extra-break-tag/#post-13881949)
 * Good to know where the issue is coming from! Theoretically we have snapshot tests
   for the output of many different block variations so the chance that it’s a problem
   coming from this plugin directly should be rather low.

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

The topic ‘Button block adding extra break tag’ is closed to new replies.

 * ![](https://ps.w.org/wp-bootstrap-blocks/assets/icon.svg?rev=2059732)
 * [Bootstrap Blocks](https://wordpress.org/plugins/wp-bootstrap-blocks/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-bootstrap-blocks/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-bootstrap-blocks/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-bootstrap-blocks/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-bootstrap-blocks/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-bootstrap-blocks/reviews/)

 * 8 replies
 * 3 participants
 * Last reply from: [tschortsch](https://wordpress.org/support/users/tschortsch/)
 * Last activity: [5 years, 4 months ago](https://wordpress.org/support/topic/button-block-adding-extra-break-tag/#post-13881949)
 * Status: resolved