Java HTML Decode HTMLDecode(String s)

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

Description

HTML Decode

License

Open Source License

Declaration

public static String HTMLDecode(String s) 

Method Source Code

//package com.java2s;
/*// ww  w.j a  v  a  2 s. co  m
 * Copyright (C) 2012 dungnv. All rights reserved.
 * VIETTEL PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
 */

public class Main {
    private static final String c[] = { "<", ">" };
    private static final String expansion[] = { "&lt;", "&gt;" };

    public static String HTMLDecode(String s) {
        String mine = s;
        for (int i = 0; i < c.length; i++) {
            mine.replaceAll(expansion[i], (c[i] + ""));
        }
        return mine;
    }
}

Related

  1. htmlDecode(String s)
  2. htmlDecode(String strSrc)
  3. htmlDecoder(String content)
  4. htmlEntityDecode(String s)