arasplm / ArasVSMethodPlugin

Repository for Aras Innovator Visual Studio Method Plugin
MIT License
22 stars 18 forks source link

CDATA tags in code are not handled #2

Closed pbellis closed 6 years ago

pbellis commented 6 years ago

Installed product versions

Description

If method code has a CDATA tag inside (as a string value perhaps) the VS Plugin will not properly escape the sequence when outputting the file. This is important because Innovator internally wraps all method code with CDATA tags. The result of this bug is a difference in behavior (and even possibly the method will no longer compile) and Innovator will not be able to import the method.

Steps to recreate

  1. Open Aras VS Plugin enabled Project
  2. Pull method from package with CDATA tags inside of strings
  3. Save method to Package
  4. Output file incorrectly escapes CDATA

Current behavior

CDATA is not properly wrapped.

return inn.newResult("<![CDATA[" + html.ToString() + "]]]]><![CDATA[>");

... return escapedString.Replace("<![CDATA[","").Replace("]]]]><![CDATA[>", "");

incorrectly becomes:

return inn.newResult("<![CDATA[" + html.ToString() + "]]>");

... return escapedString.Replace("<![CDATA[","").Replace("]]>", "");

Expected behavior

CDATA is properly wrapped

mkubrak commented 6 years ago

Please help verify fix using the latest CI build found here http://vsixgallery.com/extension/8424E2CB-F5F4-40EA-85B8-260998634ED5/ version 1.2.17

mkubrak commented 6 years ago

Issue fixed.

mkubrak commented 6 years ago

Please help verify fix using the latest CI build found here http://vsixgallery.com/extension/8424E2CB-F5F4-40EA-85B8-260998634ED5/ version 1.2.20

mkubrak commented 6 years ago

Issue fixed and verified.