How to Disable Sanitizing of Custom Attribute Values?

I found this excellent solution for disabled the sanitizing of custom attribute titles.

Can the same be done for the attribute value?

I’m trying a script that has an array for the attribute value and part of that array has quote marks in it.