Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

Adobe Web App Rendering Issue (<em> tags showing)

Avatar

Avatar
Validate 1
Level 1
jamesx29320000
Level 1

Like

1 like

Total Posts

7 posts

Correct Reply

1 solution
Top badges earned
Validate 1
Boost 1
Affirm 1
View profile

Avatar
Validate 1
Level 1
jamesx29320000
Level 1

Like

1 like

Total Posts

7 posts

Correct Reply

1 solution
Top badges earned
Validate 1
Boost 1
Affirm 1
View profile
jamesx29320000
Level 1

07-07-2017

Hi,

I have a web app that queries our business tables to returns XML. Here's a sample of what's displayed in the "enable debug mode":

"

<ctx lang="en" _folderModel="" origin="neolane" webApp-id="64953510" _target="web" date="2017-07-07T19:33:35Z" _console="1" score="0">

  <userInfo timezone="America/New_York" theme="" orgUnitId="0" noConsoleCnx="true" loginId="3319" loginCS="Web applications agent (webapp)" locale="en-US" instanceLocale="en-US" homeDir="" datakitInDatabase="true">

  <login-right right="admin" />

  </userInfo>

  <timezone changed="false" current="America/New_York" />

  <Tbl_ProductTemplate _key="@id" _operation="update" id="195670" TemplateContentType="trip-highlights">

  <EmailTemplateContentXML>&lt;EmailTemplateContent ItemId=&amp;quot;{CEF3701C-4BF0-4B03-BCF1-C87CDE3EBAC5}&amp;quot; ItemName=&amp;quot;default&amp;quot;&gt;

  &lt;Header&gt;Preview your &amp;lt;em&amp;gt;Iberian Voyage: Lisbon to Barcelona&amp;lt;/em&amp;gt; itinerary in this video&lt;/Header&gt;

"

in the page element, I have the following to prepare and render the <Header> content:

<% var rawXmlData = ctx.Tbl_ProductTemplate.EmailTemplateContentXML;

rawXmlData = rawXmlData.toString(); rawXmlData = rawXmlData.replace(/&quot;/g, '\"'); rawXmlData = rawXmlData.replace(/&rdquo;/g, '\"'); rawXmlData = rawXmlData.replace(/&ldquo;/g, '\"'); rawXmlData = rawXmlData.replace(/&rsquo;/g, "\'"); rawXmlData = rawXmlData.replace(/&lsquo;/g, "\'"); rawXmlData = rawXmlData.replace(/&hellip;/g, "..."); var xmlData = new XML(rawXmlData); %>

<%= xmlData.Header %>

I've tried using xmlData.Header.toString().replace(/&amp;lt;em&amp;gt;/ig, '<em>') to convert the html entities back to characters so the web app will render the header correctly, but the header continue to render as <em>#########</em>. It seems like the replace is bypassing the &lt; and &gt;. Or it's being converted back.

Any help would be greatly appreciated!

Jim

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Validate 1
Level 1
jamesx29320000
Level 1

Like

1 like

Total Posts

7 posts

Correct Reply

1 solution
Top badges earned
Validate 1
Boost 1
Affirm 1
View profile

Avatar
Validate 1
Level 1
jamesx29320000
Level 1

Like

1 like

Total Posts

7 posts

Correct Reply

1 solution
Top badges earned
Validate 1
Boost 1
Affirm 1
View profile
jamesx29320000
Level 1

10-07-2017

Okay, so I found a solution. Use a document.write of the XML node resolves the issue.

Answers (2)

Answers (2)

Avatar

Avatar
Validate 1
Level 1
jamesx29320000
Level 1

Like

1 like

Total Posts

7 posts

Correct Reply

1 solution
Top badges earned
Validate 1
Boost 1
Affirm 1
View profile

Avatar
Validate 1
Level 1
jamesx29320000
Level 1

Like

1 like

Total Posts

7 posts

Correct Reply

1 solution
Top badges earned
Validate 1
Boost 1
Affirm 1
View profile
jamesx29320000
Level 1

10-07-2017

Hi Florent,

I have tried to replace just the "&lt;" and "&gt;" to "<" and ">" without any success. But I was able to replace other letters, outside of the tags, e.g., changing the letter "a" to "A", Barcelona to BArcelonA.

Thanks,

JIm

Avatar

Avatar
Give Back 50
Level 10
florentlb
Level 10

Likes

237 likes

Total Posts

1,109 posts

Correct Reply

239 solutions
Top badges earned
Give Back 50
Give Back 5
Give Back 3
Give Back 25
Give Back 200
View profile

Avatar
Give Back 50
Level 10
florentlb
Level 10

Likes

237 likes

Total Posts

1,109 posts

Correct Reply

239 solutions
Top badges earned
Give Back 50
Give Back 5
Give Back 3
Give Back 25
Give Back 200
View profile
florentlb
Level 10

10-07-2017

Hi Jim,

Have you tried with other tags than <em> to see if the problem persists?

Let me know,

Florent.