code: private static VariableResolver<String> propertiesGeneratingResolver(final VariableResolver<String> original) {
  
          return new VariableResolver<String>() {
  
              public String resolve(String name) {
                  final String value = original.resolve(name);
                  if (value == null) return null;
                  // Substitute one backslash with two
                  return value.replaceAll("\\\\", "\\\\\\\\");
              }
          };
      }
docs: Creates a resolver generating values to be safely placed in properties string.
  
  {@link Properties#load} generally removes single backslashes from input and that
  is not desirable for outcomes of macro substitution as the values can
  contain them but user has no way to escape them.
  
  @param original Resolution will be delegated to this resolver. Resolved
  values will be escaped afterwards.
  @see <a href="https://jenkins-ci.org/issue/10539">JENKINS-10539</a>