You are here

function lingotek_xml_decode in Lingotek Translation 7.2

Same name and namespace in other branches
  1. 6 lingotek.util.inc \lingotek_xml_decode()
2 calls to lingotek_xml_decode()
LingotekComment::updateLocalContent in lib/Drupal/lingotek/LingotekComment.php
Updates the local content with data from a Lingotek Document.
lingotek_download_document in ./lingotek.api.inc

File

./lingotek.util.inc, line 128
Utility functions.

Code

function lingotek_xml_decode($text) {

  //return htmlspecialchars_decode($text);
  $text = str_replace("&lt;", "<", $text);
  $text = str_replace("&gt;", ">", $text);
  $text = str_replace("&apos;", "'", $text);
  $text = str_replace("&quot;", "\"", $text);
  $text = str_replace("&amp;", "&", $text);
  return $text;
}