protected static function replaceUrl($value, $url, $urlConv, $type) {
    if ($type == 'embedded') {
      $value = str_replace('"'.$url.'"', '"'.$urlConv.'"', $value);
    }
    else {
      $value = str_replace($url, $urlConv, $value);
    }
    return $value;
  }