How do I call Blaze._allowJavascriptUrls?

Hi all,

I have a couple of href links that is javascript:;.

However, Meteor threw an error -

(blaze.js:71) Warning: URLs that use the ‘javascript:’ protocol are not allowed in URL attribute values. Call Blaze._allowJavascriptUrls() to enable them.

How do I call Blaze._allowJavascriptUrls()?

Thank you!

I added this in and it seems to be okay now.

Template.sidebar.onCreated(function() {
Blaze._allowJavascriptUrls();
});
1 Like