File tree Expand file tree Collapse file tree 2 files changed +2
-23
lines changed Expand file tree Collapse file tree 2 files changed +2
-23
lines changed Original file line number Diff line number Diff line change @@ -20,7 +20,6 @@ import {
20
20
Response ,
21
21
ui ,
22
22
} from 'ask-sdk-model' ;
23
- import { escapeXmlCharacters } from '../util/SsmlUtils' ;
24
23
import { ResponseBuilder } from './ResponseBuilder' ;
25
24
import Stream = interfaces . audioplayer . Stream ;
26
25
import AudioItem = interfaces . audioplayer . AudioItem ;
@@ -80,7 +79,7 @@ export class ResponseFactory {
80
79
response . outputSpeech = {
81
80
type : 'SSML' ,
82
81
ssml : '<speak>'
83
- + escapeXmlCharacters ( trimOutputSpeech ( speechOutput ) )
82
+ + trimOutputSpeech ( speechOutput )
84
83
+ '</speak>' ,
85
84
playBehavior,
86
85
} ;
@@ -96,7 +95,7 @@ export class ResponseFactory {
96
95
outputSpeech : {
97
96
type : 'SSML' ,
98
97
ssml : '<speak>'
99
- + escapeXmlCharacters ( trimOutputSpeech ( repromptSpeechOutput ) )
98
+ + trimOutputSpeech ( repromptSpeechOutput )
100
99
+ '</speak>' ,
101
100
playBehavior,
102
101
} ,
Original file line number Diff line number Diff line change @@ -118,26 +118,6 @@ describe('ResponseFactory', () => {
118
118
expect ( responseBuilder . reprompt ( speechOutput , 'ENQUEUE' ) . getResponse ( ) ) . to . deep . equal ( expectResponse ) ;
119
119
} ) ;
120
120
121
- it ( 'should auto-escape invalid ssml character' , ( ) => {
122
- const responseBuilder : ResponseBuilder = ResponseFactory . init ( ) ;
123
- const speechOutput = 'Hello World & Happy New Year!' ;
124
- const expectResponse = {
125
- outputSpeech : {
126
- ssml : '<speak>' + `Hello World & Happy New Year!` + '</speak>' ,
127
- type : 'SSML' ,
128
- } ,
129
- reprompt : {
130
- outputSpeech : {
131
- ssml : '<speak>' + `Hello World & Happy New Year!` + '</speak>' ,
132
- type : 'SSML' ,
133
- } ,
134
- } ,
135
- shouldEndSession : false ,
136
- } ;
137
-
138
- expect ( responseBuilder . speak ( speechOutput ) . reprompt ( speechOutput ) . getResponse ( ) ) . to . deep . equal ( expectResponse ) ;
139
- } ) ;
140
-
141
121
it ( 'should build response with simple card' , ( ) => {
142
122
const responseBuilder : ResponseBuilder = ResponseFactory . init ( ) ;
143
123
const cardTitle = 'Card Title' ;
You can’t perform that action at this time.
0 commit comments