0
Answered

sayText() escaped

Tora 6 years ago updated by Gil Sideman 6 years ago 2

I escaped the text so that sayText() works.

Example:

KPMG's page entitled "Italy - Overview and introduction"

becomes:

KPMG\'s page entitled \"Italy - Overview and introduction\"

In cases with the single quote ' it works fine, but it does not work with the double quote "

what do I need to do to make this work? 

Thanks!!

Answer

Answer
Under review

Hi Tora - 

I think your question is more of a JS question that a sayText specific question.

I tried your text - as is, without adding any foreslashes - in our sayText example page - 

http://www.oddcast.com/support1/saytext_classic.html
It worked fine.

So - sayText has no problem with this input.

But in our example page the text is not included as a literal within the code, but entered by the user and provided to sayText as a variable.

In your own test page I am guessing you have the text hard coded in the page - and JS has rules about the syntax of single and double quotes in literal strings and how to encode them.

Try adding the text dynamically (text input field ) as in our example - or, please post a link to your page and we'll take a look.

Best,

Gil

The SitePal Team

GOOD, I'M SATISFIED
Satisfaction mark by Tora 6 years ago
Answer
Under review

Hi Tora - 

I think your question is more of a JS question that a sayText specific question.

I tried your text - as is, without adding any foreslashes - in our sayText example page - 

http://www.oddcast.com/support1/saytext_classic.html
It worked fine.

So - sayText has no problem with this input.

But in our example page the text is not included as a literal within the code, but entered by the user and provided to sayText as a variable.

In your own test page I am guessing you have the text hard coded in the page - and JS has rules about the syntax of single and double quotes in literal strings and how to encode them.

Try adding the text dynamically (text input field ) as in our example - or, please post a link to your page and we'll take a look.

Best,

Gil

The SitePal Team