MyBB Community Forums

Full Version: jQuery security issue?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Trying to insert this into my index template gives me a security error. What's the problem?

<script type="text/javascript">
  jQuery.noConflict();


jQuery(document).ready(function(){
  jQuery('.brand_icon').mouseenter(function(){
  jQuery(this).next('.brand_tooltip').show();
   jQuery(this).next('.brand_tooltip').position({at: 'bottom center', of: $(this), my: 'top', offset: '0 15'})

  });


  jQuery('.brand_icon').mouseleave(function(){$('.brand_tooltip').hide();});
});
</script>
you could try to change {$( to {;$(

it should make no difference for JS but it should break the PHP string {$var} interpretation of it.

Technically the correct solution would be \$ but unfortunately that expands to \$ and not $.
Thanks! That did it,.
We really do need to do something about how the security checker works. This kind of issue may be rare but it does keep recurring.
Edit: already solved