How do I include an affiliate script? I am trying to add an affiliate script to my Drupal 7 website.
I am doing this in a custom block.

Specifically, I create a block, select the scripts text format in my WYSIWYG Editor, add the script and save. I then add the block to the page I want.

This seemed to work for a few months and then suddenly, it disappeared and stopped working (probably due to an update).

The script has the below format:

&lt;script src="https://sbhc.portalhc.com/123456/searchbox/234567"&gt;&lt;/script&gt;


I have tried adding the code using all text formats (Plain Text, Scripts, Full HTML etc.). I've also tried adding it using one text format and then switching to another. I've also tried adding it through the Source button on the WYSIWYG editor.

As confirmed above, the script did work for a few months before disappearing and no extra modules have been added. I can confirm the script is correct because I can see what it generates on the provider portal.
If you don't want to code it manually, you can check this module JS injector which lets you inject JS code into your site.


  Allows administrators to inject JS into the page output based on
  configurable rules. It's useful for adding simple JS tweaks without
  modifying a site's official theme - for example, a 'nighttime' color
  scheme could be added during certain hours. The JS is added using
  Drupal's standard drupal_add_js() function and respects page caching,
  etc.
  
  This module is definitely not a replacement for full-fledged theming,
  but it provides site administrators with a quick and easy way of
  tweaking things without diving into full-fledged theme hacking.
  
  The rules provided by JS injector typically are loaded last, even
  after the theme JS, although another module could override these.