Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

public class Main {
    /**
     * Same Source String escape(Object text) in com.sec.fs.common.spring.EscapeXmlReference
     * @param text
     * @return
     */
    public static String escape(Object text) {
        return text == null ? null
                : text.toString().replaceAll("&", "&")
                        //             .replaceAll("\"",""")
                        //             .replaceAll("\"","'")
                        .replaceAll("<", "&lt;").replaceAll(">", "&gt;");
    }
}