B2022-134: update ros crash when ro has '<' or '>' and ro is used in table #199

Merged
jjenko merged 1 commits from GenWork into Development 2024-01-09 12:00:00 -05:00

View File

@ -711,6 +711,11 @@ namespace VEPROMS.CSLA.Library
else else
newvalue = newvalue.Replace(@"\u9586?", m.Groups[1].Value + @"\u9586?" + m.Groups[3].Value); newvalue = newvalue.Replace(@"\u9586?", m.Groups[1].Value + @"\u9586?" + m.Groups[3].Value);
} }
// B2022-134: crash when updating an RO that contains '<' or '>' when RO is used in a table cell. These
// are xml special characters, the grid is stored as xml, so these characters need translated so that
// storing them as xml in the database won't crash. They get translated back when used in Proms.
if (newvalue.Contains("<")) newvalue = newvalue.Replace("<", "&lt;");
if (newvalue.Contains(">")) newvalue = newvalue.Replace(">", "&gt;");
if (gg != newvalue) if (gg != newvalue)
{ {
retval = gg; retval = gg;