Pathologic is a handy little module that performs one simple, but very important, function – fix broken links due to a change in URL structure. If you’ve ever moved your Drupal site from one environment to another, like going from your development server to production, or moved a site from a domain name to a folder, you’re going to encounter broken links in your content.
Uploading images or creating links through a WYSIWYG editor will create an absolute reference based on the current URL, whether it’s a local environment like 127.0.0.1 or a development environment like http://dev.domain.com. When you move the site, the Drupal isn’t aware of the change since the URLs are hard-coded into the node content.
Pathologic solves this problem by adding an input filter that can be applied to input formats for your content.