When I call Mojo::DOM::replace with content that includes the following: And then write the contents of the DOM to disk, it comes out as: