use global flag in regex to update *all* links

[#45737301], [#46733573]