# "mainwp\_header\_left" strips HTML and inserts content between H4 tags

**URL:** <https://community.mainwp.com/t/mainwp-header-left-strips-html-and-inserts-content-between-h4-tags/2619>\
**Category:** Dev\
**Created:** [January 23, 2021, 1:26pm UTC](https://community.mainwp.com/t/mainwp-header-left-strips-html-and-inserts-content-between-h4-tags/2619 "2021-01-23T13:26:00Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![phalancs](https://community.mainwp.com/user_avatar/community.mainwp.com/phalancs/32/3864_2.png) [@phalancs](https://community.mainwp.com/u/phalancs)\
**Post date:** [January 23, 2021, 1:26pm UTC](https://community.mainwp.com/t/mainwp-header-left-strips-html-and-inserts-content-between-h4-tags/2619/1 "2021-01-23T13:26:00Z")

</div>

I use the filter “mainwp\_header\_left” to add content to the top left header. I have placed a few buttons and the search bar for the sites there. Since the recent dashboard update. HTML gets stripped before content is put there. This renders this filter rather useless. Also, the filter just puts the content between H4 tags. Why?

Please enable us to add HTML to the header or fix the current filter. A filter named “mainwp\_header\_left” is not expected to just add text to the headline.

THE HTML GETS STRIPPED HERE:  
/class/class-mainwp-ui.php

IN THIS LINE:  
MainWP\_Utility::esc\_content( $left, ‘note’, $more\_tags );

HOW I USE THE FILTER:  
add\_filter( ‘mainwp\_header\_left’, ‘enym\_headerbuttons\_function’, 10, 3 );

 ![Screenshot 2021-01-23 142728](https://community.mainwp.com/uploads/default/original/2X/4/4b35fdbbaf3a5f854edd31c00b7a3219cf703ec9.png)

[“mainwp\_before\_header” is a hook that cannot be used for this. It just modifies the $websites array afaik]

---

<div class="post-metadata">

**Author:** ![phalancs](https://community.mainwp.com/user_avatar/community.mainwp.com/phalancs/32/3864_2.png) [@phalancs](https://community.mainwp.com/u/phalancs)\
**Post date:** [January 29, 2021, 5:37pm UTC](https://community.mainwp.com/t/mainwp-header-left-strips-html-and-inserts-content-between-h4-tags/2619/2 "2021-01-29T17:37:40Z")

</div>

Bump? Is there any MainWP dev who wants to help? We really need a solution ☹ I thought MainWP wanted to support devs but please listen to us or at least provide me with a channel to get a solution.

---

<div class="post-metadata">

**Author:** ![bogdan](https://community.mainwp.com/user_avatar/community.mainwp.com/bogdan/32/11_2.png) [@bogdan](https://community.mainwp.com/u/bogdan)\
**Post date:** [March 19, 2021, 3:18pm UTC](https://community.mainwp.com/t/mainwp-header-left-strips-html-and-inserts-content-between-h4-tags/2619/4 "2021-03-19T15:18:59Z")

</div>

Opened on March 19, 2021, 3:18pm UTC



---

<div class="post-metadata">

**Author:** ![bogdan](https://community.mainwp.com/user_avatar/community.mainwp.com/bogdan/32/11_2.png) [@bogdan](https://community.mainwp.com/u/bogdan)\
**Post date:** [March 19, 2021, 3:19pm UTC](https://community.mainwp.com/t/mainwp-header-left-strips-html-and-inserts-content-between-h4-tags/2619/5 "2021-03-19T15:19:41Z")

</div>

Our dev team upated the filter so it shouldn’t stripe HTML tags.

Update attached here:

> **[Dropbox - Error - Simplify your life](https://www.dropbox.com/s/i7fyjs4xskgixkk/mainwp.zip?dl=0)**
