We have upgraded our project from "SDL Tridion 2011 SP1" to "SDL Tridion 2013 SP1" with legacy feature.
All went fine and our application was also running properly.
But suddenly after republishing the pages component linking is not generating properly and also image src is pointing to some directory in %Tridion_Home% directory which makes loading image persistent on default.aspx page.

Link looks like :- 

    <a href="/WebUI/Editors/CME/Views/Popups/Preview/Preview.aspx#id=tcm:15-753"
    >Trees and Woodlands</a>

Img src look like :- 

`<img rc="%Tridion_Home%/Preview/sitename/Images/DSC_0417%20226x152_tcm15-44682-v0.jpg"`

We have dotnet based application and we are using razor templating in it.

We have looked into the similar question [Link][1] but could not get success.


  [1]: https://tridion.stackexchange.com/questions/5582/component-link-is-not-working

Any help or pointer will be highly appreciated.

The above tag was from the template builder because the component link tag is now coming blank so i tried to debug the issue and i copied the tag from template builder.
Earlier the tag was like:-

    <li><tridion:ComponentLink runat="server" PageURI="tcm:15-54072-64" ComponentURI="tcm:15-753" TemplateURI="tcm:0-0-0" AddAnchor="false" LinkText="Trees and Woodlands" LinkAttributes="" TextOnFail="true"/></li>

But now after publishing the li tag is coming blank and page is publishing to filesystem. 
Thanks