Expression contains single slash in UI, but double slash in Code View
- Dominant language
- TypeScript
- Stars
- 111
- Forks
- 109
- Avg merge
- 1d 23h
- Merged PRs (30d)
- 20
Description
### Severity
P3 - Medium (Minor functionality affected)
### Describe the Bug with repro steps
In the designer when adding an expression that contains a forward slash, the UI displays a single slash, but the code view displays two slashes.
Expected behavior:
- The value in code view should reflect the same value as in the UI. In the UI we see \r\n
split(replace(body('Get_blob_content_(V2)'),'~',''), '\r\n')
Actual behavior:
- The code view contains double slashes whereas the UI only shows one slash. In the code view we see \\r\\n
@split(replace(body('Get_blob_content_(V2)'),'~',''), '\\r\\n')
Steps to reproduce:
1. Add a Compose action
2. In the inputs add an expression
3. Paste "split(replace(body('Get_blob_content_(V2)'),'~',''), '\r\n')" as the expression value and click 'Add.'
4. Compare UI with the Code View
### What type of Logic App Is this happening in?
Standard (Portal)
### Are you experiencing a regression?
_No response_
### Which operating system are you using?
Windows
### Did you refer to the TSG before filing this issue? https://aka.ms/lauxtsg
Yes
### Workflow JSON
```json
{
"definition": {
"$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#",
"contentVersion": "1.0.0.0",
"actions": {
"Compose": {
"type": "Compose",
"inputs": "split(replace(body('Get_blob_content_(V2)'),'~',''), '\\r\\n')",
"runAfter": {
"Get_blob_content_(V2)": [
"SUCCEEDED"
]
}
},
"Get_blob_content_(V2)": {
"type": "ApiConnection",
"inputs": {
"host": {
"connection": {
"referenceName": "azureblob"
}
},
"method": "get",
"path": "/v2/datasets/@{encodeURIComponent(encodeURIComponent('test'))}/files/@{encodeURIComponent(encodeURIComponent('test'))}/content",
"queries": {
"inferContentType": true
}
},
"runAfter": {}
}
},
"outputs": {},
"triggers": {
"When_an_HTTP_request_is_received": {
"type": "Request",
"kind": "Http"
}
}
},
"kind": "Stateful"
}
```
### Screenshots or Videos
Value in the UI:
Value in the Code View:
### Environment
- Browser: Edge Version 140.0.3485.54
- Extension Version: 2.50818.1.11
- Session ID: 33f79461df0a4f748555dafe45bd4234
### Additional context
_No response_
Contributor guide
No contributing guide indexed for this repository
Research direction
Start in the designer expression input and Code View handling, reproducing the issue with the provided split/replace expression and workflow JSON. Trace how the expression is displayed in each view; done means the Code View represents the same value as the UI without an extra level of escaping.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react, typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100