Title: Javascript in button widget is stripped
Last modified: July 23, 2022

---

# Javascript in button widget is stripped

 *  [hanshenrik](https://wordpress.org/support/users/hanshenrik/)
 * (@hanshenrik)
 * [3 years, 10 months ago](https://wordpress.org/support/topic/javascript-in-button-widget-is-stripped/)
 * when trying to add a button to Header Widget with the “url” being javascript,
   the javascript is just stripped. for example if you create a Button widget and
   set the “url” to Javascript:alert(123); the href will actually be empty on page!

The topic ‘Javascript in button widget is stripped’ is closed to new replies.

 * ![](https://i0.wp.com/themes.svn.wordpress.org/sinatra/1.4.1/screenshot.jpg)
 * Sinatra
 * [Support Threads](https://wordpress.org/support/theme/sinatra/)
 * [Active Topics](https://wordpress.org/support/theme/sinatra/active/)
 * [Unresolved Topics](https://wordpress.org/support/theme/sinatra/unresolved/)
 * [Reviews](https://wordpress.org/support/theme/sinatra/reviews/)

## Tags

 * [javascript](https://wordpress.org/support/topic-tag/javascript/)

 * 0 replies
 * 1 participant
 * Last reply from: [hanshenrik](https://wordpress.org/support/users/hanshenrik/)
 * Last activity: [3 years, 10 months ago](https://wordpress.org/support/topic/javascript-in-button-widget-is-stripped/)
 * Status: not resolved