updated canonical logic

the previous canonical logic stopped working at some point, this restores the canonical logic to work as expected

additional note: liquid sucks. As such, this code is forced to use the filter `replace` to check for a protocol
ideally the code would use `truncate` but it's behavior is strange at best.

In the future errors may occur where a url looks like "sendgrid.com/docs/http://yay.co" and this will be set to the canonical
at this time, the risk of that is extremely small, but it bears re-examining.