relative url for anchors & images

better implementation of relative url for anchors and images