Moved the backslash removal into the regex, removed makelink() since it's only used once.