Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SSML generator should escape XML control characters #57

Closed
Robertof opened this issue Nov 28, 2018 · 3 comments
Closed

SSML generator should escape XML control characters #57

Robertof opened this issue Nov 28, 2018 · 3 comments

Comments

@Robertof
Copy link

Hey,

first of all - thanks for your library! I encountered an issue during the use of SSMLGenerator. By doing something like:

$generator = new SsmlGenerator();
$generator->say ("This & That");
print $generator->getSsml(), "\n";

An invalid SSML document is generated (and refused by Alexa), as it contains the "&" XML control character unescaped.
This reference should be useful. I think that using htmlspecialchars on the input provided to say() should be sufficient, I'll investigate.

Thanks,
Roberto

@maxbeckers
Copy link
Owner

Good point. Could be helpful in some cases. Wanna fix it and create a PR?

@Robertof
Copy link
Author

Alright, I'll take care of it in the coming days!

@maxbeckers
Copy link
Owner

Fine, Thanks 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants