Copy link to clipboard
Copied
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?
Thank you for reporting this bug. I reported it to the team and they have logged a bug for it with High Priority status. The fix should make its way into a future update.
If this makes Dreamweaver unusable for your current needs, continue using the previous version until we have an update wtih this fix.
I apologize for the inconvenience.
Thanks,
Preran
Copy link to clipboard
Copied
Try changing your Preferences > Code Rewriting
Copy link to clipboard
Copied
WOW, this is horrible!
It doesn't rewrite the code until you close the .js file and reopen it.
Changing the setting has no effect.
Owch!
That's not going to fly.
Copy link to clipboard
Copied
Doesn't change anything.
Copy link to clipboard
Copied
I can confirm the same action is taking place under W7 in CC2017.
I was about to say "it's not happening here" but I closed and reopened the file and it was rewritten, html entities were changed to their characters.
EDIT: Make sure to file a bug report here: Feature Request/Bug Report Form
Copy link to clipboard
Copied
That's awful .
Who is filing the Bug Report?
Adobe Dreamweaver CC: Feature Ideas
Nancy O.
Copy link to clipboard
Copied
I filed one. I say we flood the dev team with this one.
Be very, very careful with any currently functioning scripts you may have in your sites. Making a change and saving them could blow the whole thing apart.
EDIT: I tested the same script as a <head> item in an html page and it doesn't "update" it on closing and reopening.,
Preran,
Could you help expedite the dev team's awareness of this one?
Copy link to clipboard
Copied
OK. I did the same. I thought Code Linting might be contributing to it, but no.
I'm so glad I keep file backups.
Copy link to clipboard
Copied
Thank you for the shout. I have emailed the product team and let them know how important this is for all of you here.
Thanks,
Preran
Copy link to clipboard
Copied
I confirm this BIG BUG!
Adobe, I suggest you to remove DW CC 2017 from the market before that all yours customers go away.
Copy link to clipboard
Copied
Please file a report Adobe Dreamweaver CC: Feature Ideas
Copy link to clipboard
Copied
Same issue here, even after turning off the rewriting rules.
Bug!
Copy link to clipboard
Copied
Thank you for reporting this bug. I reported it to the team and they have logged a bug for it with High Priority status. The fix should make its way into a future update.
If this makes Dreamweaver unusable for your current needs, continue using the previous version until we have an update wtih this fix.
I apologize for the inconvenience.
Thanks,
Preran