Fix regex bug and add support for other svg elements