Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
//License from project: Open Source License 

public class Main {
    private static String escapeHTML(final String content) {
        String escaped = content.replace("&", "&");
        escaped = escaped.replace("<", "&lt;");
        escaped = escaped.replace(">", "&gt;");
        escaped = escaped.replace("\r\n", "\n");
        escaped = escaped.replace("\r", "\n");
        escaped = escaped.replace("\n", "<br/>");
        return escaped;
    }
}