Bug when visiting same thread url

If we click the URL in the post DiscourseConnect - Official Single-Sign-On for Discourse (sso) it goes to DiscourseConnect - Official Single-Sign-On for Discourse (sso) but its not rendered showing the error in console below

As its a replace string, the @team would need to look at that.

an extra topic appears in the final link

it should be https://meta.discourse.org/t/13045 but for some reason it changes to https://meta.discourse.org/t/topic/13045