# Button link for javascript code stopped working

**URL:** <https://community.wpbeaverbuilder.com/t/button-link-for-javascript-code-stopped-working/18827>\
**Category:** Beaver Builder\
**Created:** [August 5, 2024, 11:57am UTC](https://community.wpbeaverbuilder.com/t/button-link-for-javascript-code-stopped-working/18827 "2024-08-05T11:57:13Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![pross](https://community.wpbeaverbuilder.com/user_avatar/community.wpbeaverbuilder.com/pross/32/883_2.png) [@pross](https://community.wpbeaverbuilder.com/u/pross)\
**Post date:** [August 5, 2024, 12:26pm UTC](https://community.wpbeaverbuilder.com/t/button-link-for-javascript-code-stopped-working/18827/2 "2024-08-05T12:26:51Z")

</div>

It was actually a security fix we added back in Febuary.

You can read about ways to get around it here:

> [@Javascript and relative links in urls](https://community.wpbeaverbuilder.com/t/javascript-and-relative-links-in-urls/18270):
>
> As of 2.8 and 2.7.4.3 we have to use esc\_url to sanitize links to stop your websites getting hacked. This can cause issues when you add sample-page as a link, or something like javascript:SomeFunction() Tto get around this there are a couple of snippets you can use, please be aware though you are messing with core WP functions these snippets are an example and should be used with caution. This first filter allows urls to start with a letter, like sample-page relative link, WP allows links to…

---

_[View the full topic](https://community.wpbeaverbuilder.com/t/button-link-for-javascript-code-stopped-working/18827)._
