Broken URL on node teaser code Fankly this is a silly question.

I want to print node teaser in a block.

As discussed here: How to programmatically render a node&#39;s teaser using the theme layer? I've used this code to get the html code of teaser:

 $node = node_load($nid);
 $rendered_teaser = drupal_render(node_view($node, 'teaser'));
 //now print this teaser in block using PHP filter.


But the problem is that this contains a logo whose img src value is 


  http: //default/sites/default/files/styles/small-logo-image/public/ddn-job/iitblogo-1395397403j.jpg?itok=ZhTVC9Ee


Also internal URL's are linked as http:// localhost/node/1 which should have been http:// localhost/mysite/node/1

What is the problem? I've also tried running it through check_markup($rendered_teaser,'full_html')
About this problem :


  Also internal URL's are linked as http:// localhost/node/1 which should have been http:// localhost/mysite/node/1


The solution lies in the .htaccess file, at the root of your site : locate the line with RewriteBase, uncomment it if needed, and set it to : RewriteBase /mysite/