Santé méritétaine, Sam’s Club.' LANGUAGE #2 '
Meritain Salud, Sam's Club. Santé méritétaine, Sam’s Club.
' LANGUAGE #2 '
Meritain Salud, Sam's Club. Santé méritétaine, Sam’s Club.
' LANGUAGE #2 '
Meritain Salud, Sam's Club.

Is there anyway I can escape ' without affecting the whole html in azure cognitive service translation?

61 Views Asked by At

LANGUAGE #1

'<div><span style="">Santé méritétaine,</span> Sam’s Club.</div>'

LANGUAGE #2

'<div><span style=\"\">Meritain Salud,</span> Sam's Club.</div>'

Using azure cognitive service, I've translated two htmls. Above are their results.

The first one got no error because the ’ doesn't cuts the string in the word Sam’s.

I got problem in the second one because ' used is the same with the string syntax. It becomes ''' .

Escaping ' character means replacing ' to '' characters. Also, it might not good to use replace extension because the whole html might be affected.

is there anyway I can escape ' without affecting the whole html?

1

There are 1 best solutions below

0
Ramprasad On

Some possible methods are:

Doubling the single quote characters, e.g., ’ becomes ‘’.

Using a backslash to escape the single quote, e.g., ’ becomes '.

Replacing the single quote with an HTML entity.