String is immutable, which means that the html reference doesn't change, rather the replace method returns a new String object that you have to assign.
html = html.replace(delimiter + entry.getKey()+ delimiter, entry.getValue());
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…