code: public void replace(String what, Object with) {
      if (what.charAt(0)=='$')
        throw new RuntimeException("$ is now control char that denotes URL encoding!");
      for (Placeholder p : _placeholders.get(what))
        p.end.insertAndAdvance(with.toString());
  
      for (Placeholder p : _placeholders.get("$"+what))
        try {
          p.end.insertAndAdvance(URLEncoder.encode(with.toString(),"UTF-8"));
        } catch (IOException e) {
          p.end.insertAndAdvance(e.toString());
        }
    }
docs: another in order.