Escaped backslashes in translated HTML (embedded in done JSON file)

20 views
Skip to first unread message

Manuel Souto Pico

unread,
Jun 28, 2022, 7:06:09 AM6/28/22
to okapi-users
Hello :)

I am translating a JSON file where the translatable key has HTML content.

{
    "key": "CM155Q04",
    "text": "<p>Click <strong>here</strong>.</p>"
}

The JSON filter has a HTML subfilter. I translate the XLIFF file and that goes well, but when I run the post-processing step, the done file I get looks like this:

{
    "key": "CM155Q04",
    "text": "<p>Clica <strong>aquí<\/strong>.<\/p>"
}

In other parts of the file I can see double quotes inside the HTML are escaped, which is fine. However, I wouldn't expect the slashes in the closing HTML tags to be escaped.

I haven't seen an option to tweak that in the documentation of the JSON or the HTML filters.

Any idea how I can change that behaviour?

Thank you so much.

Cheers,  Manuel

Manuel Souto Pico

unread,
Jul 18, 2022, 3:05:01 PM7/18/22
to okapi-users
I found it:

JSON Filter Parameters > Content Processing > Encoding settings: Escape forward slashes

I am blind sometimes.

Cheers, Manuel

Reply all
Reply to author
Forward
0 new messages