Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions Src/Common/FwUtils/StringTable.cs
Original file line number Diff line number Diff line change
Expand Up @@ -177,9 +177,10 @@ private void MergeCustomGroups(XmlNode parentNode, XmlNodeList customGroupNodeLi
// 1. Import new strings, or override extant strings with custom strings.
foreach (XmlNode customStringNode in customGroupNode.SelectNodes("string"))
{
string customId = XmlUtils.GetMandatoryAttributeValue(customStringNode, "id");
string customTxt = GetTxtAtributeValue(customStringNode);
XmlNode srcMatchingStringNode = srcMatchingGroupNode.SelectSingleNode("string[@id='" + customId + "']");
var customId = XmlUtils.GetMandatoryAttributeValue(customStringNode, "id");
var customTxt = GetTxtAtributeValue(customStringNode);
// escape customId for use in XPath query, in case it contains characters that are not valid in XPath queries.
var srcMatchingStringNode = srcMatchingGroupNode.SelectSingleNode("string[@id='" + XmlUtils.MakeSafeXml(customId) + "']");
if (srcMatchingStringNode == null)
{
// Import the new string into the extant group.
Expand Down
Loading