Java String Quote quoteHtml(String s)

Here you can find the source of quoteHtml(String s)

Description

quote Html

License

Open Source License

Declaration

private static String quoteHtml(String s) 

Method Source Code

//package com.java2s;
/*//  www. j  a  va2s.c o m
 // This software is subject to the terms of the Eclipse Public License v1.0
 // Agreement, available at the following URL:
 // http://www.eclipse.org/legal/epl-v10.html.
 // You must accept the terms of that agreement to use this software.
 //
 // Copyright (C) 2011-2011 Pentaho
 // All Rights Reserved.
 */

public class Main {
    private static String quoteHtml(String s) {
        return s.replaceAll("&", "&").replaceAll(">", ">")
                .replaceAll("<", "&lt;");
    }
}

Related

  1. quoteForMdx(StringBuilder buf, String val)
  2. quoteForRegEx(String input)
  3. quoteForXML(String from)
  4. quoteHost(final String hostname)
  5. quoteHtml(final String s)
  6. quoteHTML(String string)
  7. quoteHtmlContent(String x)
  8. quoteIdentifier(String identifier)
  9. quoteIdentifier(String identifier, boolean isPedantic)