Currently it is impossible to override HTML writer methods to fine-tune them. For Gitea project we need custom link/image URLs but only way to implement this is to copy all HTML writer and change single method. Mostly it is because of nodeAsString method that clones writer and also WriteNode usage that passes HTML writer all over the place