Fix incorrect handling of some specific links (#1489060)