Hi Dave,
UFW plugin does not manipulate the widget or it’s contents.
It displays the widget as is.
Looking at your issue, I sense the HTML code is stripped due to permission issue or some restrictions when it is saved. Please try with the elevated credentials or see if any securty features are on on your website.
If I misunderstood, please share more details if required.
Thanks,
Aakash