title: Displaying a linked image (<img src=.../>) in a UIWebView on iPhone not working
body: <p>I'm having trouble displaying an image in a UIWebView.</p>
  
  <ul>
  <li><p>I retrieve html content from a feed.</p></li>
  <li><p>In this content there is a <code>&lt;img src=.../&gt;</code> tag.</p></li>
  <li><p>Loading this content into a UIWebview, the image doesn't display, showing only the missing image "?" instead.</p></li>
  </ul>
  
  <p>It seems that the link to the image in src= contains some interesting characters and that these need to be escaped in order to get the correct image.</p>
  
  <p>For example, in the feed I get the following which doesn't work:</p>
  
  <pre><code>&lt;img src="http://www.somedomain.com/0,,10268~9189636,00-1.jpg" /&gt;
  </code></pre>
  
  <p>However, if I use the following escaped link, it does work:</p>
  
  <pre><code>&lt;img src="http://www.somedomain.com/0%2C%2C10268%7E9189636%2C00-1.jpg" /&gt;
  </code></pre>
  
  <p>The problem then arises that if I escape the html content (using the Google gtm_stringByEscapingForHTML function, for example), the whole lot gets escaped and the UIWebview just ends up displaying the html as a string of html. For example:</p>
  
  <pre><code>"&lt;p&gt;Hello this is a test&lt;/p&gt;&lt;img src="someimagesource.jpg"/&gt;......"
  </code></pre>
  
  <p>I actually used to be able to see the images, but can't prove that something has changed at the back end. I haven't changed anything at the front end.</p>
  
  <p>I guess my questions are, therefore:</p>
  
  <ol>
  <li>Can anyone shed any more light on the potential cause of this issue?</li>
  <li>Can anyone suggest a fix I can apply at the front end to get around this issue?</li>
  </ol>
  
  <p>Thanks very much in advance for your help. </p>