You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The xliff export-import function has some problems when we use javascript code in any idevice.
For example if we write the following easy function.
<script type="text/javascript">// <![CDATA[
function programa(sw) {
var pic;
var testua;
switch (sw) {
case 0:
pic = "MCN04_AUX_R09_00_SolucionModales.png";
testua = "<h1>hola</h1>";
break;
case 1:
pic = "MCN04_AUX_R09_N20_SolucionModales.png";
testua = "<h1>hola2</h1>";
break;
case 2:
pic = "MCN04_AUX_R09_N30_SolucionModales.png";
testua = "<h1>hola3</h1>";
break;
}
document.getElementById('myImage').src = pic;
document.getElementById('codea').innerHTML = testua;
}
// ]]></script>
It return the following function to the new import idevice.
<script type="text/javascript">// <![CDATA[
function programa(sw) {
var pic;
var testua;
switch (sw) {
case 0:
pic = "MCN04_AUX_R09_00_SolucionModales.png";
testua = "<h1>hola</h1>";
break;
case 1:
pic = "MCN04_AUX_R09_N20_SolucionModales.png";
testua = "<h1>hola2</h1>";
break;
case 2:
pic = "MCN04_AUX_R09_N30_SolucionModales.png";
testua = "<h1>hola3</h1>";
break;
}
document.getElementById('myImage').src = pic;
document.getElementById('codea').innerHTML = testua;
}
// ]]></script>
As we can see it escape all the html entities with something like (htmlentities in PHP) but it doesn't reformat again with something like (html_entity_decode in PHP) to make it work properly then.
Would be nice to fix it ;)
The text was updated successfully, but these errors were encountered:
It looks like the problem could be when you export the content wrapping on CDATA and you try to import it again, the CDATA of the javascript code is inside the content general CDATA and the parses never looks for that part so it let it "broken".
Hi,
The xliff export-import function has some problems when we use javascript code in any idevice.
For example if we write the following easy function.
It return the following function to the new import idevice.
As we can see it escape all the html entities with something like (htmlentities in PHP) but it doesn't reformat again with something like (html_entity_decode in PHP) to make it work properly then.
Would be nice to fix it ;)
The text was updated successfully, but these errors were encountered: