Template HTML applies URI encoding after saving

This article explains a fix for the Adobe Campaign Standard (ACS) issue where template HTML applies URI encoding after saving. To avoid this, you should keep your ACS fragments as simple as possible in the beginning, and make changes to the header as required after creating the final template.

Description description

Environment

Adobe Campaign Standard

Issue/Symptoms

When using fragments and templates, tags seem to be URI encoded after saving.

Characters such as “&” will change into &, < into < and > into >. This issue occurs because of the meta tags that are added into the body tag.

Resolution resolution

A META tag has to be added in the header, not the body. META tags are only allowed to be added into the HEADER (like, a TITLE), so adding it into the BODY makes it invalid.

Explanation: When these items are saved in an ACS fragment, ACS adds a new header and pushes the meta tags, titles, etc., outside the header code. At a later stage, when you save the fragment/template, ACS parses the HTML and attempts to clean it by applying URI encoding to what it recognizes as text values for display. This ultimately changes some of the code, so it can’t render as expected.

Fix - Remove all elements of header information, meta tags, and CSS from fragments.

Simple fix - Keep all fragments as simple as possible, bare-bones HTML within a structure. After creating your final template, you can go into the HTML for it and add additional meta tags and CSS to the header already created by ACS.

recommendation-more-help
3d58f420-19b5-47a0-a122-5c9dab55ec7f