CC 2017 - HTML entities in js files being converted when saved

Community Beginner ,
Nov 08, 2016 Nov 08, 2016

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 = {

        "&": `&`,

        "<": "&lt;",

        ">": "&gt;",

        '"': "&quot;",

        "'": "&#39;",

        "/": "&#x2F;"

    };

   

    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?

Views

1.3K

Likes

translate

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct Answer

Adobe Employee , Nov 09, 2016 Nov 09, 2016
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

Likes

translate

Translate

Translate
Adobe Community Professional ,
Nov 08, 2016 Nov 08, 2016

Copy link to clipboard

Copied

Try changing your Preferences > Code Rewriting

Nancy O'Shea, Adobe Product User & Community Professional
Alt-Web Design & Publishing ~ Web : Print : Graphics : Media

Likes

translate

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Nov 08, 2016 Nov 08, 2016

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.

Likes

translate

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Nov 09, 2016 Nov 09, 2016

Copy link to clipboard

Copied

Doesn't change anything.

Likes

translate

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Nov 08, 2016 Nov 08, 2016

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

Likes

translate

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Nov 08, 2016 Nov 08, 2016

Copy link to clipboard

Copied

DOH!

That's awful .

Who is filing the Bug Report?

Adobe Dreamweaver CC: Feature Ideas

Nancy O.

Nancy O'Shea, Adobe Product User & Community Professional
Alt-Web Design & Publishing ~ Web : Print : Graphics : Media

Likes

translate

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Nov 08, 2016 Nov 08, 2016

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?

Likes

translate

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Nov 08, 2016 Nov 08, 2016

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.

Nancy O'Shea, Adobe Product User & Community Professional
Alt-Web Design & Publishing ~ Web : Print : Graphics : Media

Likes

translate

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Nov 08, 2016 Nov 08, 2016

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

Likes

translate

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Nov 08, 2016 Nov 08, 2016

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.

Likes

translate

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Nov 08, 2016 Nov 08, 2016

Copy link to clipboard

Copied

Please file a report Adobe Dreamweaver CC: Feature Ideas

Ben
Not a Google fan, use Bing instead.

Likes

translate

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Nov 08, 2016 Nov 08, 2016

Copy link to clipboard

Copied

Same issue here, even after turning off the rewriting rules.


Bug!

Likes

translate

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Nov 09, 2016 Nov 09, 2016

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

Likes

translate

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines