diff --git a/Tasks/AzureRmWebAppDeployment/task.json b/Tasks/AzureRmWebAppDeployment/task.json index 069a7e76edb1..db144407ce83 100644 --- a/Tasks/AzureRmWebAppDeployment/task.json +++ b/Tasks/AzureRmWebAppDeployment/task.json @@ -18,7 +18,7 @@ "version": { "Major": 4, "Minor": 1, - "Patch": 0 + "Patch": 1 }, "releaseNotes": "What's new in version 4.* (preview)
Supports Kudu Zip Deploy
Supports App Service Environments
Improved UI for discovering different App service types supported by the task
Click [here](https://aka.ms/azurermwebdeployreadme) for more Information.", "minimumAgentVersion": "2.104.1", diff --git a/Tasks/AzureRmWebAppDeployment/task.loc.json b/Tasks/AzureRmWebAppDeployment/task.loc.json index 4a66422cf61f..0290d983dcb3 100644 --- a/Tasks/AzureRmWebAppDeployment/task.loc.json +++ b/Tasks/AzureRmWebAppDeployment/task.loc.json @@ -18,7 +18,7 @@ "version": { "Major": 4, "Minor": 1, - "Patch": 0 + "Patch": 1 }, "releaseNotes": "ms-resource:loc.releaseNotes", "minimumAgentVersion": "2.104.1", diff --git a/Tasks/Common/webdeployment-common/Tests/L1XmlVarSub/Web.config b/Tasks/Common/webdeployment-common/Tests/L1XmlVarSub/Web.config index e78469530df8..7e6cf629abe1 100644 --- a/Tasks/Common/webdeployment-common/Tests/L1XmlVarSub/Web.config +++ b/Tasks/Common/webdeployment-common/Tests/L1XmlVarSub/Web.config @@ -28,6 +28,7 @@ + diff --git a/Tasks/Common/webdeployment-common/Tests/L1XmlVarSub/Web_Expected.config b/Tasks/Common/webdeployment-common/Tests/L1XmlVarSub/Web_Expected.config index 645c73ceda47..0a90e434e840 100644 --- a/Tasks/Common/webdeployment-common/Tests/L1XmlVarSub/Web_Expected.config +++ b/Tasks/Common/webdeployment-common/Tests/L1XmlVarSub/Web_Expected.config @@ -28,6 +28,7 @@ + diff --git a/Tasks/Common/webdeployment-common/xmlvariablesubstitutionutility.ts b/Tasks/Common/webdeployment-common/xmlvariablesubstitutionutility.ts index 60d7b78ab09c..6f55f8f99cec 100644 --- a/Tasks/Common/webdeployment-common/xmlvariablesubstitutionutility.ts +++ b/Tasks/Common/webdeployment-common/xmlvariablesubstitutionutility.ts @@ -112,7 +112,9 @@ export function substituteXmlVariables(configFile, tags, variableMap, parameterF tl.debug(error); return; } - var replacableTokenValues = {}; + var replacableTokenValues = { + "APOS_CHARACTER_TOKEN": "'" + }; var isSubstitutionApplied: boolean = false; for(var tag of tags) { var nodes = ltxDomUtiltiyInstance.getElementsByTagName(tag); @@ -146,6 +148,7 @@ export function substituteXmlVariables(configFile, tags, variableMap, parameterF } if(isSubstitutionApplied) { + replaceEscapeXMLCharacters(xmlDocument); var domContent = ( fileEncodeType[1]? '\uFEFF' : '' ) + ltxDomUtiltiyInstance.getContentWithHeader(xmlDocument); for(var replacableTokenValue in replacableTokenValues) { tl.debug('Substituting original value in place of temp_name: ' + replacableTokenValue); @@ -262,4 +265,18 @@ function updateXmlConnectionStringsNodeAttribute(xmlDomNode, variableMap, replac } return isSubstitutionApplied; +} + +function replaceEscapeXMLCharacters(xmlDOMNode) { + if(!xmlDOMNode || typeof xmlDOMNode == 'string') { + return; + } + + for(var xmlAttribute in xmlDOMNode.attrs) { + xmlDOMNode.attrs[xmlAttribute] = xmlDOMNode.attrs[xmlAttribute].replace(/'/g, "APOS_CHARACTER_TOKEN"); + } + + for(var xmlChild of xmlDOMNode.children) { + replaceEscapeXMLCharacters(xmlChild); + } } \ No newline at end of file diff --git a/Tasks/IISWebAppDeploymentOnMachineGroup/task.json b/Tasks/IISWebAppDeploymentOnMachineGroup/task.json index a5d244d562c8..d81137ce3e3f 100644 --- a/Tasks/IISWebAppDeploymentOnMachineGroup/task.json +++ b/Tasks/IISWebAppDeploymentOnMachineGroup/task.json @@ -15,7 +15,7 @@ "version": { "Major": 0, "Minor": 0, - "Patch": 37 + "Patch": 38 }, "demands": [], "minimumAgentVersion": "2.104.1", diff --git a/Tasks/IISWebAppDeploymentOnMachineGroup/task.loc.json b/Tasks/IISWebAppDeploymentOnMachineGroup/task.loc.json index 6377dbb7a894..38cb1bf6f1f4 100644 --- a/Tasks/IISWebAppDeploymentOnMachineGroup/task.loc.json +++ b/Tasks/IISWebAppDeploymentOnMachineGroup/task.loc.json @@ -15,7 +15,7 @@ "version": { "Major": 0, "Minor": 0, - "Patch": 37 + "Patch": 38 }, "demands": [], "minimumAgentVersion": "2.104.1",