@@ -0,0 +1,2625 @@
+/*%0A * Licensed to the Apache Software Foundation (ASF) under one or more%0A * contributor license agreements.  See the NOTICE file distributed with%0A * this work for additional information regarding copyright ownership.%0A * The ASF licenses this file to You under the Apache License, Version 2.0%0A * (the %22License%22); you may not use this file except in compliance with%0A * the License.  You may obtain a copy of the License at%0A *%0A *   http://www.apache.org/licenses/LICENSE-2.0%0A *%0A * Unless required by applicable law or agreed to in writing, software%0A * distributed under the License is distributed on an %22AS IS%22 BASIS,%0A * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.%0A * See the License for the specific language governing permissions and%0A * limitations under the License.%0A *%0A */%0A%0Apackage org.apache.jmeter.functions;%0A%0Aimport java.util.Collection;%0Aimport java.util.LinkedList;%0Aimport java.util.List;%0A%0Aimport org.apache.commons.lang3.StringEscapeUtils;%0Aimport org.apache.jmeter.engine.util.CompoundVariable;%0Aimport org.apache.jmeter.samplers.SampleResult;%0Aimport org.apache.jmeter.samplers.Sampler;%0Aimport org.apache.jmeter.util.JMeterUtils;%0A%0A/**%0A * %3Cp%3EFunction which escapes the characters in a %3Ccode%3EString%3C/code%3E using XML 1.0 entities.%3C/p%3E%0A *%0A * %3Cp%3E%0A * For example:%0A * %3C/p%3E%0A * %3Cp%3E%3Ccode%3E%22bread%22 &amp; 'butter'%3C/code%3E%3C/p%3E%0A * becomes:%0A * %3Cp%3E%0A * %3Ccode%3E&amp;quot;bread&amp;quot; &amp;amp; &amp;apos;butter&amp;apos;%3C/code%3E.%0A * %3C/p%3E%0A *%0A *%0A * @see StringEscapeUtils#escapeXml10(String) (Commons Lang)%0A * @since 3.2%0A */%0Apublic class EscapeXml extends AbstractFunction %7B%0A%0A    private static final List%3CString%3E desc = new LinkedList%3CString%3E();%0A%0A    private static final String KEY = %22__escapeXml%22; //$NON-NLS-1$%0A%0A    static %7B%0A        desc.add(JMeterUtils.getResString(%22escape_xml_string%22)); //$NON-NLS-1$%0A    %7D%0A%0A    private Object%5B%5D values;%0A%0A    public EscapeXml() %7B%0A    %7D%0A%0A    /** %7B@inheritDoc%7D */%0A    @Override%0A    public String execute(SampleResult previousResult, Sampler currentSampler)%0A            throws InvalidVariableException %7B%0A%0A        String rawString = ((CompoundVariable) values%5B0%5D).execute();%0A        return StringEscapeUtils.escapeXml10(rawString);%0A%0A    %7D%0A%0A    /** %7B@inheritDoc%7D */%0A    @Override%0A    public void setParameters(Collection%3CCompoundVariable%3E parameters) throws InvalidVariableException %7B%0A        checkParameterCount(parameters, 1);%0A        values = parameters.toArray();%0A    %7D%0A%0A    /** %7B@inheritDoc%7D */%0A    @Override%0A    public String getReferenceKey() %7B%0A        return KEY;%0A    %7D%0A%0A    /** %7B@inheritDoc%7D */%0A    public List%3CString%3E getArgumentDesc() %7B%0A        return desc;%0A    %7D%0A%7D%0A

Add the missing part of pr #288, which is the new function itself.