Platinum Partner

Replace relative url's with absolute

This snippet will replace all anchor that have relative url's to be absolute to whatever domain you provide. I use it often so I thought I would share.


]*href\s*?=[\"'])(?!http)([^\"'>]+)([\"'>]+)#";
$html=preg_replace($pattern,$replace, $html);
return $html;

}
{{ tag }}, {{tag}},

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}
{{ parent.authors[0].realName || parent.author}}

{{ parent.authors[0].tagline || parent.tagline }}

{{ parent.views }} ViewsClicks
Tweet

{{parent.nComments}}