CC 2017 - HTML entities in js files being converted when saved
Here is my function:
function escapeHtml(sStr) {
// Dreamweaver CC 2017 is converting these entities. I can't stop it.
var entityMap = {
"&": `&`,
"<": "<",
">": ">",
'"': """,
"'": "'",
"/": "/"
};
return String(sStr).replace(/[&<>"'\/]/g, function (s) {
return entityMap
;});
}
After saving:
function escapeHtml(sStr) {
// Dreamweaver CC 2017 is converting these entities. I can't stop it.
var entityMap = {
"&": `&`,
"<": "<",
">": ">",
'"': """,
"'": "'",
"/": "/"
};
return String(sStr).replace(/[&<>"'\/]/g, function (s) {
return entityMap
;});
}
This is just a regular .js file. Why is this happening?
