Wrap html in link based on uri component of other field I need to wrap a div in a template file in an a tag whose href comes from a file field. My markup would be something like this: 

&lt;a href="/path/to/file"&gt;
  &lt;h1&gt;Title&lt;/h1&gt;
&lt;/a&gt;


Sounds easy enough but the uri that I'm given looks like this "public://newsletter/downloads/Issue 95_0.pdf" which renders but when clicked doesn't go anywhere. How can I turn that link into a valid link?
I needed to use the drupal function file_create_url and PHP parse_url to accomplish this.

function newsletter_preprocess_node(&amp;$variables) {

  if ($variables['type'] === 'newsletter' &amp;&amp; $variables['view_mode']) {
    // Generate a path to the file based on the download uri
    $path = $variables['field_download'][0]['uri'];
    $path = file_create_url($path);
    $path = parse_url($path);
    $path = $path['path'];
    $variables['download_link'] = $path;
  }
}