If you have ever worked on more complicated Javascript on the Salesforce platform, you may have utilized the JSINHTMLENCODE() function. According to the docs, the JSINHTMLENCODE() function: Encodes text and merge field values for use in JavaScript inside HTML tags by replacing characters that are reserved in HTML with HTML entity equivalents and inserting escape