In php I tried:
$link = get_permalink(icl_object_id(349,'page',false, $lang)); $link = str_replace("n", "", $link); echo json_encode(stripslashes($link));
But I still get
"https://example.com/it/jiku/jikubox/le-mie-infografiche/"
Advertisement
Answer
You are encoding the URL as JSON, so use a JSON parser (such as JSON.parse(string)
or one built into your Ajax library).