Token replacement now replaces all instances

Was previously only replacing the first instance of a dynamic token eg. `<% url[1] %>`