-
Notifications
You must be signed in to change notification settings - Fork 292
Closed
Labels
R9Release 9 - May 15th, 2020Release 9 - May 15th, 2020
Milestone
Description
Port this change from botbuilder-dotnet/master branch:
microsoft/botbuilder-dotnet#3580
close: #3510
update Expression escape policy to make expression achieve higher robustness.
the new strategy of expression evaluation about escape characters is as below:
- in any case,
\n,\r,\t,\\would be unescaped. - In double quotation mark string,
\"would be unescaped. There is no need to escape`and'in double quotation mark string - In single quotation marks string,
\'would be unescaped. There is no need to escape`and"in single quotation mark string - in string interpolation mode,
\`and\$would be unescaped - other characters that have
\prefix, would leave it as is
samples:
| expression | result | description |
|---|---|---|
| `hi\`` | hi` | support ` escape in string interpolation |
| `\${a}` | ${a} | escape $ in string interpolation |
| "ab\"cd" | ab"cd | escape " in double quot string |
| 'ab\'cd' | ab'cd | escape ' in single quot string |
| "ab`cd" | ab`cd | no need to escape ` in normal string(' or ") |
| "ab\ncd" | ab [newline] cd | newline would be unescaped |
| `hi\y` | hi\y | unrecognized escape character would not be unescaped |
| "ab\ycd" | ab\ycd | unrecognized escape character would not be unescaped |
Changed projects
- AdaptiveExpressions
- AdaptiveExpressions.Tests
- Microsoft.Bot.Builder.LanguageGeneration.Tests
[LG,R9]
Metadata
Metadata
Assignees
Labels
R9Release 9 - May 15th, 2020Release 9 - May 15th, 2020