• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

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.8K

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

Votes

Translate

Translate
Community Expert ,
Nov 08, 2016 Nov 08, 2016

Copy link to clipboard

Copied

Try changing your Preferences > Code Rewriting

Nancy O'Shea— Product User, Community Expert & Moderator
Alt-Web Design & Publishing ~ Web : Print : Graphics : Media

Votes

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 Expert ,
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.

Votes

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

LATEST

Doesn't change anything.

Votes

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 Expert ,
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

Votes

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 Expert ,
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— Product User, Community Expert & Moderator
Alt-Web Design & Publishing ~ Web : Print : Graphics : Media

Votes

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 Expert ,
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?

Votes

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 Expert ,
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— Product User, Community Expert & Moderator
Alt-Web Design & Publishing ~ Web : Print : Graphics : Media

Votes

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

Votes

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.

Votes

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 Expert ,
Nov 08, 2016 Nov 08, 2016

Copy link to clipboard

Copied

Please file a report Adobe Dreamweaver CC: Feature Ideas

Wappler, the only real Dreamweaver alternative.

Votes

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 08, 2016 Nov 08, 2016

Copy link to clipboard

Copied

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


Bug!

Votes

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

Votes

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