HTML script tag from AMPscript loses the language parameter in plain text version
Trailblazer Community

HTML script tag from AMPscript loses the language parameter in plain text version

Marketing Cloud Email Studio

Last updated 12 days ago ·Reference W-10384557 ·Reported By 0 users

In Review

Summary
AmpScript blocks are originally written within HTML script tags <script runat="server" language="ampscript">. However, in the plain Text view the language attribute of the script tag is removed, which means it will be treated as SSJS. This causes an issue in Preview and Test if the text version is edited separately from the HTML version.

Repro
1. Create an email.
2. Add HTML block.
3. Insert a tag as described, e.g. <script runat="server" language="ampscript"> Add(1, 2) </script>
4. Perform a subscriber preview. (Everything is fine.)
5. Go back and switch to plain text view. Already you can see the language attribute of the script tag has been removed, which means it'll be treated as SSJS.
6. Click in to the editor and unlink when prompted
7. Perform another subscriber preview.

Workaround
The workaround is to click Restore text from HTML on the toolbar of the Plain Text tab.

Reported By (0)

Any unreleased services, features, statuses, or dates referenced in this or other public statements are not currently available and may not be delivered on time or at all. Customers who purchase our services should make their purchase decisions based upon features that are currently available.