Use regex instead of DOM module to get avatar URL

Closes #5518