package kr.co.kihyun.text.hml; import java.io.IOException; import java.io.UnsupportedEncodingException; import kr.co.kihyun.moumi.MoumiConfig; //import kr.co.kihyun.text.hml.HtmlUtil; //import kr.co.kihyun.text.hml.VirtualHtml; import kr.co.kihyun.text.html.TagFilter; // TODO : refactoring public class CyberHtm { // public static final String tmpSavePath = Moumi.getTotRoot() + "/hml"; //v2. 5.static final 필드 변조 가능성 : Update by KWON,HAN // public static final String tmpSavePath = MoumiConfig.getTotRoot().getPath() + System.getProperty("file.separator") // + "hml"; private static final String tmpSavePath = MoumiConfig.getTotRoot().getPath() + System.getProperty("file.separator") + "hml"; //========================================================== public CyberHtm() { } public static String getCyberHtm(String s) throws IOException, UnsupportedEncodingException { VirtualHtml VH = null; StringBuffer sb = null; StringBuilder htm = null; int offset = 0; int opener_idx = 0; int closer_idx = 0; VH = new VirtualHtml(); /* * VH.IOhandler(tmpSavePath + "/virtual.html", tmpSavePath + "/tresh/VirtualHtml.src"); */ VH.IOhandler(tmpSavePath + System.getProperty("file.separator") + "virtual.html", tmpSavePath + System.getProperty("file.separator") + "tresh" + System.getProperty("file.separator") + "VirtualHtml.src"); htm = new StringBuilder(); htm.append(s); opener_idx = htm.indexOf(""); sb = new StringBuffer(); if (opener_idx != -1) { String H = VH.getHead(); sb.append(H); htm = TagFilter.replace(htm, "", ""); htm = TagFilter.replace(htm, "", ""); htm = TagFilter.replace(htm, "", ""); htm = TagFilter.replace(htm, "", ""); int tag_title_idx = 0; int tag_title_lidx = 0; while (true) { tag_title_idx = htm.indexOf("", tag_title_idx); if (tag_title_idx != -1) { tag_title_lidx = htm.indexOf("", tag_title_idx); htm = htm.replace(tag_title_idx, tag_title_lidx + 8, ""); tag_title_idx++; } else break; } int tag_meta_idx = 0; while (true) { tag_meta_idx = htm.indexOf("", tag_meta_idx); htm = htm.replace(tag_meta_idx, serch_idx1 + 1, ""); } else break; } int tag_body_idx = 0; while (true) { tag_body_idx = htm.indexOf("", tag_body_idx); htm = htm.replace(tag_body_idx, serch_idx2 + 1, ""); } else break; } htm = TagFilter.replace(htm, "", ""); htm = TagFilter.replace(htm, "
", ""); htm = TagFilter.replace(htm, "
", ""); int tag_p_idx = 0; while (true) { tag_p_idx = htm.indexOf("", tag_p_idx); htm = htm.replace(tag_p_idx, serch_idx3 + 1, ""); } else break; } htm = TagFilter.replace(htm, "

", ""); htm = TagFilter.replace(htm, "
", ""); htm = TagFilter.replace(htm, "
", ""); int tag_div_idx = 0; while (true) { tag_div_idx = htm.indexOf("", tag_div_idx); htm = htm.replace(tag_div_idx, serch_idx4 + 1, ""); } else break; } htm = TagFilter.replace(htm, "", ""); htm = TagFilter.replace(htm, "
", "");
			htm = TagFilter.replace(htm, "
", ""); int tag_marquee_idx = 0; while (true) { tag_marquee_idx = htm.indexOf("", tag_marquee_idx); htm = htm.replace(tag_marquee_idx, serch_idx5 + 1, ""); } else break; } int tag_marquee_lidx = 0; while (true) { tag_marquee_lidx = htm.indexOf(""); if (tag_marquee_lidx != -1) { htm = htm.replace(tag_marquee_lidx, tag_marquee_lidx + 10, ""); } else break; } int tag_hnumber_idx = 0; while (true) { tag_hnumber_idx = htm.indexOf(""); if (tag_hnumber_idx != -1) { htm = htm.replace(tag_hnumber_idx, tag_hnumber_idx + 9, ""); } else break; } int tag_hnumber_lidx = 0; while (true) { tag_hnumber_lidx = htm.indexOf(""); if (tag_hnumber_lidx != -1) { htm = htm.replace(tag_hnumber_lidx, tag_hnumber_lidx + 10, ""); } else break; } int tag_h_idx = 0; int tag_h_lidx = 0; for (int i = 1; i < 8; i++) { tag_h_idx = 0; while (true) { tag_h_idx = htm.indexOf(""); if (tag_h_idx != -1) { htm = htm.replace(tag_h_idx, tag_h_idx + 4, ""); } else break; } tag_h_lidx = 0; while (true) { tag_h_lidx = htm.indexOf(""); if (tag_h_lidx != -1) { htm = htm.replace(tag_h_lidx, tag_h_lidx + 5, ""); } else break; } } int tag_font_idx = 0; while (true) { tag_font_idx = htm.indexOf("", tag_font_idx); htm = htm.replace(tag_font_idx, serch_idx6 + 1, ""); } else break; } int tag_font_lidx = 0; while (true) { tag_font_lidx = htm.indexOf(""); if (tag_font_lidx != -1) { htm = htm.replace(tag_font_lidx, tag_font_lidx + 7, ""); } else break; } int tag_basefont_idx = 0; while (true) { tag_basefont_idx = htm.indexOf("", tag_basefont_idx); htm = htm.replace(tag_basefont_idx, serch_idx7 + 1, ""); } else break; } int tag_b_idx = 0; while (true) { tag_b_idx = htm.indexOf(""); if (tag_b_idx != -1) { htm = htm.replace(tag_b_idx, tag_b_idx + 3, ""); } else break; } int tag_b_lidx = 0; while (true) { tag_b_lidx = htm.indexOf(""); if (tag_b_lidx != -1) { htm = htm.replace(tag_b_lidx, tag_b_lidx + 4, ""); } else break; } int tag_i_idx = 0; while (true) { tag_i_idx = htm.indexOf(""); if (tag_i_idx != -1) { htm = htm.replace(tag_i_idx, tag_i_idx + 3, ""); } else break; } int tag_i_lidx = 0; while (true) { tag_i_lidx = htm.indexOf(""); if (tag_i_lidx != -1) { htm = htm.replace(tag_i_lidx, tag_i_lidx + 4, ""); } else break; } int tag_s_idx = 0; while (true) { tag_s_idx = htm.indexOf(""); if (tag_s_idx != -1) { htm = htm.replace(tag_s_idx, tag_s_idx + 3, ""); } else break; } int tag_s_lidx = 0; while (true) { tag_s_lidx = htm.indexOf(""); if (tag_s_lidx != -1) { htm = htm.replace(tag_s_lidx, tag_s_lidx + 4, ""); } else break; } int tag_tt_idx = 0; while (true) { tag_tt_idx = htm.indexOf(""); if (tag_tt_idx != -1) { htm = htm.replace(tag_tt_idx, tag_tt_idx + 4, ""); } else break; } int tag_tt_lidx = 0; while (true) { tag_tt_lidx = htm.indexOf(""); if (tag_tt_lidx != -1) { htm = htm.replace(tag_tt_lidx, tag_tt_lidx + 5, ""); } else break; } int tag_u_idx = 0; while (true) { tag_u_idx = htm.indexOf(""); if (tag_u_idx != -1) { htm = htm.replace(tag_u_idx, tag_u_idx + 3, ""); } else break; } int tag_u_lidx = 0; while (true) { tag_u_lidx = htm.indexOf(""); if (tag_u_lidx != -1) { htm = htm.replace(tag_u_lidx, tag_u_lidx + 4, ""); } else break; } int tag_blink_idx = 0; while (true) { tag_blink_idx = htm.indexOf(""); if (tag_blink_idx != -1) { htm = htm.replace(tag_blink_idx, tag_blink_idx + 7, ""); } else break; } int tag_blink_lidx = 0; while (true) { tag_blink_lidx = htm.indexOf(""); if (tag_blink_lidx != -1) { htm = htm.replace(tag_blink_lidx, tag_blink_lidx + 8, ""); } else break; } int tag_sub_idx = 0; while (true) { tag_sub_idx = htm.indexOf(""); if (tag_sub_idx != -1) { htm = htm.replace(tag_sub_idx, tag_sub_idx + 5, ""); } else break; } int tag_sub_lidx = 0; while (true) { tag_sub_lidx = htm.indexOf(""); if (tag_sub_lidx != -1) { htm = htm.replace(tag_sub_lidx, tag_sub_lidx + 6, ""); } else break; } int tag_sup_idx = 0; while (true) { tag_sup_idx = htm.indexOf(""); if (tag_sup_idx != -1) { htm = htm.replace(tag_sup_idx, tag_sup_idx + 5, ""); } else break; } int tag_sup_lidx = 0; while (true) { tag_sup_lidx = htm.indexOf(""); if (tag_sup_lidx != -1) { htm = htm.replace(tag_sup_lidx, tag_sup_lidx + 6, ""); } else break; } int tag_ul_idx = 0; while (true) { tag_ul_idx = htm.indexOf("
    "); if (tag_ul_idx != -1) { htm = htm.replace(tag_ul_idx, tag_ul_idx + 4, ""); } else break; } int tag_ul_lidx = 0; while (true) { tag_ul_lidx = htm.indexOf("
"); if (tag_ul_lidx != -1) { htm = htm.replace(tag_ul_lidx, tag_ul_lidx + 5, ""); } else break; } int tag_ol_idx = 0; while (true) { tag_ol_idx = htm.indexOf("
    "); if (tag_ol_idx != -1) { htm = htm.replace(tag_ol_idx, tag_ol_idx + 4, ""); } else break; } int tag_ol_lidx = 0; while (true) { tag_ol_lidx = htm.indexOf("
"); if (tag_ol_lidx != -1) { htm = htm.replace(tag_ol_lidx, tag_ol_lidx + 5, ""); } else break; } int tag_li_idx = 0; while (true) { tag_li_idx = htm.indexOf("", tag_li_idx); htm = htm.replace(tag_li_idx, serch_idx8 + 1, ""); } else break; } int tag_blockquote_idx = 0; while (true) { tag_blockquote_idx = htm.indexOf("
"); if (tag_blockquote_idx != -1) { htm = htm.replace(tag_blockquote_idx, tag_blockquote_idx + 12, ""); } else break; } int tag_blockquote_lidx = 0; while (true) { tag_blockquote_lidx = htm.indexOf("
"); if (tag_blockquote_lidx != -1) { htm = htm.replace(tag_blockquote_lidx, tag_blockquote_lidx + 13, ""); } else break; } int tag_a_idx = 0; while (true) { tag_a_idx = htm.indexOf("", tag_a_idx); htm = htm.replace(tag_a_idx, serch_idx9 + 1, ""); } else break; } int tag_a_lidx = 0; while (true) { tag_a_lidx = htm.indexOf(""); if (tag_a_lidx != -1) { htm = htm.replace(tag_a_lidx, tag_a_lidx + 4, ""); } else break; } int tag_img_idx = 0; while (true) { tag_img_idx = htm.indexOf("", tag_img_idx); htm = htm.replace(tag_img_idx, serch_idx10 + 1, ""); } else break; } int tag_th_idx = 0; while (true) { tag_th_idx = htm.indexOf(""); if (tag_th_idx != -1) { htm = htm.replace(tag_th_idx, tag_th_idx + 4, ""); } else break; } int tag_th_lidx = 0; while (true) { tag_th_lidx = htm.indexOf(""); if (tag_th_lidx != -1) { htm = htm.replace(tag_th_lidx, tag_th_lidx + 5, ""); } else break; } int tag_frameset_idx = 0; while (true) { tag_frameset_idx = htm.indexOf("", tag_frameset_idx); htm = htm.replace(tag_frameset_idx, serch_idx11 + 1, ""); } else break; } int tag_frameset_lidx = 0; while (true) { tag_frameset_lidx = htm.indexOf(""); if (tag_frameset_lidx != -1) { htm = htm.replace(tag_frameset_lidx, tag_frameset_lidx + 11, ""); } else break; } int tag_frame_idx = 0; while (true) { tag_frame_idx = htm.indexOf("", tag_frame_idx); htm = htm.replace(tag_frame_idx, serch_idx12 + 1, ""); } else break; } int tag_frame_lidx = 0; while (true) { tag_frame_lidx = htm.indexOf(""); if (tag_frame_lidx != -1) { htm = htm.replace(tag_frame_lidx, tag_frame_lidx + 8, ""); } else break; } int tag_caption_idx = 0; while (true) { tag_caption_idx = htm.indexOf("", tag_caption_idx); htm = htm.replace(tag_caption_idx, serch_idx13 + 1, ""); } else break; } int tag_caption_lidx = 0; while (true) { tag_caption_lidx = htm.indexOf(""); if (tag_caption_lidx != -1) { htm = htm.replace(tag_caption_lidx, tag_caption_lidx + 10, ""); } else break; } int tag_col_idx = 0; while (true) { tag_col_idx = htm.indexOf("", tag_col_idx); htm = htm.replace(tag_col_idx, serch_idx14 + 1, ""); } else break; } int tag_span_idx = 0; while (true) { tag_span_idx = htm.indexOf("", tag_span_idx); htm = htm.replace(tag_span_idx, serch_idx15 + 1, ""); } else break; } int tag_span_lidx = 0; while (true) { tag_span_lidx = htm.indexOf(""); if (tag_span_lidx != -1) { htm = htm.replace(tag_span_lidx, tag_span_lidx + 7, ""); } else break; } int not_tag_idx = 0; while (true) { not_tag_idx = htm.indexOf("", not_tag_idx); htm = htm.replace(not_tag_idx, not_tag_lidx + 1, ""); } else break; } int tag_oTable_idx = 0; while (true) { tag_oTable_idx = htm.indexOf("", tag_oTable_idx); htm = htm.replace(tag_oTable_idx, serch_idx16 + 1, ""); } else break; } int tag_iTABLE_idx = 0; int serch_idx17 = 0; while (true) { tag_iTABLE_idx = htm.indexOf("", tag_iTABLE_idx); htm = htm.replace(tag_iTABLE_idx, serch_idx17 + 1, "
"); tag_iTABLE_idx++; } else break; } int tag_tr_idx = 0; int serch_idx18 = 0; while (true) { tag_tr_idx = htm.indexOf("", tag_tr_idx); htm = htm.replace(tag_tr_idx, serch_idx18 + 1, ""); tag_tr_idx++; } else break; } int tag_td_idx = 0; int serch_idx19 = 0; int colspan_idx = 0; int rowspan_idx = 0; int align_left = 0; int align_center = 0; int align_right = 0; int quotation_mark_idx1 = 0; int quotation_mark_idx2 = 0; int quotation_mark_idx3 = 0; int data_blank_idx1 = 0; int data_blank_idx2 = 0; int data_blank_idx3 = 0; int data_blank_idx4 = 0; while (true) { tag_td_idx = htm.indexOf("
", tag_td_idx); _TD.append(htm.substring(tag_td_idx, serch_idx19 + 1)); colspan_idx = _TD.indexOf("colspan"); rowspan_idx = _TD.indexOf("rowspan"); align_left = _TD.indexOf("align=left"); align_center = _TD.indexOf("align=center"); align_right = _TD.indexOf("align=right"); if (colspan_idx != -1 && rowspan_idx == -1) { StringBuffer _ColSpan_ = new StringBuffer(); data_blank_idx1 = _TD.indexOf(" ", colspan_idx); if (data_blank_idx1 == -1) data_blank_idx1 = _TD.indexOf(">", colspan_idx); if (data_blank_idx1 == -1) data_blank_idx1 = _TD.indexOf("\"", colspan_idx); if (data_blank_idx1 == -1) data_blank_idx1 = _TD.indexOf("/", colspan_idx); _ColSpan_.append(_TD.substring(colspan_idx + 8, data_blank_idx1)); quotation_mark_idx1 = _ColSpan_.indexOf("\""); if (quotation_mark_idx1 != -1) { StringBuffer DefaultTdColSpan = new StringBuffer(); DefaultTdColSpan.append(""); if (align_left != -1) DefaultTdColSpan.append(""); else if (align_center != -1) DefaultTdColSpan.append(""); else if (align_right != -1) DefaultTdColSpan.append(""); htm = htm.replace(tag_td_idx, serch_idx19 + 1, DefaultTdColSpan.toString()); } else { StringBuffer DefaultTdColSpan = new StringBuffer(); DefaultTdColSpan.append(""); if (align_left != -1) DefaultTdColSpan.append(""); else if (align_center != -1) DefaultTdColSpan.append(""); else if (align_right != -1) DefaultTdColSpan.append(""); htm = htm.replace(tag_td_idx, serch_idx19 + 1, DefaultTdColSpan.toString()); } } else if (colspan_idx == -1 && rowspan_idx != -1) { StringBuffer _RowSpan_ = new StringBuffer(); data_blank_idx2 = _TD.indexOf(" ", rowspan_idx); if (data_blank_idx2 == -1) data_blank_idx2 = _TD.indexOf(">", rowspan_idx); if (data_blank_idx2 == -1) data_blank_idx2 = _TD.indexOf("\"", rowspan_idx); if (data_blank_idx2 == -1) data_blank_idx2 = _TD.indexOf("/", rowspan_idx); _RowSpan_.append(_TD.substring(rowspan_idx + 8, data_blank_idx2)); quotation_mark_idx2 = _RowSpan_.indexOf("\""); if (quotation_mark_idx2 != -1) { StringBuffer DefaultTdRowSpan = new StringBuffer(); DefaultTdRowSpan.append(""); if (align_left != -1) DefaultTdRowSpan.append(""); else if (align_center != -1) DefaultTdRowSpan.append(""); else if (align_right != -1) DefaultTdRowSpan.append(""); htm = htm.replace(tag_td_idx, serch_idx19 + 1, DefaultTdRowSpan.toString()); } else { StringBuffer DefaultTdRowSpan = new StringBuffer(); DefaultTdRowSpan.append(""); if (align_left != -1) DefaultTdRowSpan.append(""); else if (align_center != -1) DefaultTdRowSpan.append(""); else if (align_right != -1) DefaultTdRowSpan.append(""); htm = htm.replace(tag_td_idx, serch_idx19 + 1, DefaultTdRowSpan.toString()); } } else if (colspan_idx != -1 && rowspan_idx != -1) { StringBuffer _ColSpan2_ = new StringBuffer(); StringBuffer _RowSpan2_ = new StringBuffer(); data_blank_idx3 = _TD.indexOf(" ", colspan_idx); data_blank_idx4 = _TD.indexOf(" ", rowspan_idx); _ColSpan2_.append(_TD.substring(colspan_idx + 8, data_blank_idx3)); _RowSpan2_.append(_TD.substring(rowspan_idx + 8, data_blank_idx4)); quotation_mark_idx3 = _ColSpan2_.indexOf("\""); if (quotation_mark_idx3 != -1) { StringBuffer DefaultTdColSpanRowSpan = new StringBuffer(); DefaultTdColSpanRowSpan.append(""); if (align_left != -1) DefaultTdColSpanRowSpan.append(""); else if (align_center != -1) DefaultTdColSpanRowSpan.append(""); else if (align_right != -1) DefaultTdColSpanRowSpan.append(""); htm = htm.replace(tag_td_idx, serch_idx19 + 1, DefaultTdColSpanRowSpan.toString()); } else { StringBuffer DefaultTdColSpanRowSpan = new StringBuffer(); DefaultTdColSpanRowSpan.append(""); if (align_left != -1) DefaultTdColSpanRowSpan.append(""); else if (align_center != -1) DefaultTdColSpanRowSpan.append(""); else if (align_right != -1) DefaultTdColSpanRowSpan.append(""); htm = htm.replace(tag_td_idx, serch_idx19 + 1, DefaultTdColSpanRowSpan.toString()); } } else { if (align_left != -1) htm = htm.replace(tag_td_idx, serch_idx19 + 1, ""); else if (align_center != -1) htm = htm.replace(tag_td_idx, serch_idx19 + 1, ""); else if (align_right != -1) htm = htm.replace(tag_td_idx, serch_idx19 + 1, ""); else htm = htm.replace(tag_td_idx, serch_idx19 + 1, ""); } tag_td_idx++; } else break; } int tag_correct1_idx = 0; while (true) { tag_correct1_idx = htm.indexOf("
"); if (tag_correct6_idx != -1) { htm = htm.replace(tag_correct6_idx, tag_correct6_idx + 13, "
"); } else break; } int tag_correct7_idx = 0; while (true) { tag_correct7_idx = htm.indexOf(""); if (tag_correct7_idx != -1) { htm = htm.replace(tag_correct7_idx, tag_correct7_idx + 13, ""); } else break; } int tag_correct8_idx = 0; while (true) { tag_correct8_idx = htm.indexOf(""); if (tag_correct8_idx != -1) { htm = htm.replace(tag_correct8_idx, tag_correct8_idx + 8, ""); } else break; } int tag_correct9_idx = 0; while (true) { tag_correct9_idx = htm.indexOf(""); if (tag_correct9_idx != -1) { htm = htm.replace(tag_correct9_idx, tag_correct9_idx + 10, ""); } else break; } int tag_correct10_idx = 0; while (true) { tag_correct10_idx = htm.indexOf(""); if (tag_correct11_idx != -1) { htm = htm.replace(tag_correct11_idx, tag_correct11_idx + 10, ""); } else break; } htm.indexOf(""); htm.indexOf(""); int special_char_idx1 = 0; while (true) { special_char_idx1 = htm.indexOf("#"); if (special_char_idx1 != -1) { htm = htm.replace(special_char_idx1, special_char_idx1 + 1, "u0023"); } else break; } int special_char_idx3 = 0; while (true) { special_char_idx3 = htm.indexOf("&"); if (special_char_idx3 != -1) { htm = htm.replace(special_char_idx3, special_char_idx3 + 1, "u0026"); } else break; } int special_char_idx4 = 0; while (true) { special_char_idx4 = htm.indexOf("$"); if (special_char_idx4 != -1) { htm = htm.replace(special_char_idx4, special_char_idx4 + 1, "u0026u002336u003B"); } else break; } int special_char_idx5 = 0; while (true) { special_char_idx5 = htm.indexOf("\'"); if (special_char_idx5 != -1) { htm = htm.replace(special_char_idx5, special_char_idx5 + 1, "u0027"); } else break; } int special_char_idx6 = 0; while (true) { special_char_idx6 = htm.indexOf("("); if (special_char_idx6 != -1) { htm = htm.replace(special_char_idx6, special_char_idx6 + 1, "u0028"); } else break; } int special_char_idx7 = 0; while (true) { special_char_idx7 = htm.indexOf(")"); if (special_char_idx7 != -1) { htm = htm.replace(special_char_idx7, special_char_idx7 + 1, "u0029"); } else break; } int special_char_idx8 = 0; while (true) { special_char_idx8 = htm.indexOf("*"); if (special_char_idx8 != -1) { htm = htm.replace(special_char_idx8, special_char_idx8 + 1, "u002A"); } else break; } int special_char_idx9 = 0; while (true) { special_char_idx9 = htm.indexOf("+"); if (special_char_idx9 != -1) { htm = htm.replace(special_char_idx9, special_char_idx9 + 1, "u002B"); } else break; } int special_char_idx10 = 0; while (true) { special_char_idx10 = htm.indexOf(","); if (special_char_idx10 != -1) { htm = htm.replace(special_char_idx10, special_char_idx10 + 1, "u002C"); } else break; } int special_char_idx11 = 0; while (true) { special_char_idx11 = htm.indexOf("-"); if (special_char_idx11 != -1) { htm = htm.replace(special_char_idx11, special_char_idx11 + 1, "u002D"); } else break; } int special_char_idx12 = 0; while (true) { special_char_idx12 = htm.indexOf("."); if (special_char_idx12 != -1) { htm = htm.replace(special_char_idx12, special_char_idx12 + 1, "u002E"); } else break; } int special_char_idx14 = 0; while (true) { special_char_idx14 = htm.indexOf(":"); if (special_char_idx14 != -1) { htm = htm.replace(special_char_idx14, special_char_idx14 + 1, "u003A"); } else break; } int special_char_idx15 = 0; while (true) { special_char_idx15 = htm.indexOf(";"); if (special_char_idx15 != -1) { htm = htm.replace(special_char_idx15, special_char_idx15 + 1, "u003B"); } else break; } int special_char_idx17 = 0; while (true) { special_char_idx17 = htm.indexOf("?"); if (special_char_idx17 != -1) { htm = htm.replace(special_char_idx17, special_char_idx17 + 1, "u003F"); } else break; } int special_char_idx18 = 0; while (true) { special_char_idx18 = htm.indexOf("["); if (special_char_idx18 != -1) { htm = htm.replace(special_char_idx18, special_char_idx18 + 1, "u005B"); } else break; } int special_char_idx19 = 0; while (true) { special_char_idx19 = htm.indexOf("\\"); if (special_char_idx19 != -1) { htm = htm.replace(special_char_idx19, special_char_idx19 + 1, "u005Cu005C"); } else break; } int special_char_idx20 = 0; while (true) { special_char_idx20 = htm.indexOf("]"); if (special_char_idx20 != -1) { htm = htm.replace(special_char_idx20, special_char_idx20 + 1, "u005D"); } else break; } int special_char_idx21 = 0; while (true) { special_char_idx21 = htm.indexOf("^"); if (special_char_idx21 != -1) { htm = htm.replace(special_char_idx21, special_char_idx21 + 1, "u005E"); } else break; } int special_char_idx22 = 0; while (true) { special_char_idx22 = htm.indexOf("{"); if (special_char_idx22 != -1) { htm = htm.replace(special_char_idx22, special_char_idx22 + 1, "u007B"); } else break; } int special_char_idx23 = 0; while (true) { special_char_idx23 = htm.indexOf("}"); if (special_char_idx23 != -1) { htm = htm.replace(special_char_idx23, special_char_idx23 + 1, "u007D"); } else break; } TagFilter.replace(htm, "|", "u00A6"); TagFilter.replace(htm, "ㅇ", "o"); int bug_idx1 = htm.indexOf("<>"); int bug_idx2 = htm.indexOf(""); int bug_idx3 = htm.indexOf("<>"); int bug_idx7 = htm.indexOf(""); int bug_idx8 = htm.indexOf(""); if (bug_idx1 != -1 || bug_idx2 != -1 || bug_idx3 != -1 || bug_idx4 != -1 || bug_idx5 != -1 || bug_idx6 != -1 || bug_idx7 != -1 || bug_idx8 != -1) { String temp = HtmlUtil.tagFilter(htm.toString()); sb.append(temp); } else { sb.append(htm.toString()); } String E = VH.getEnd(); sb.append(E); } else { sb.append(htm.substring(offset, htm.length())); } if (closer_idx == -1) { offset = closer_idx + 1; } return sb.toString(); } }
"); int bug_idx4 = htm.indexOf(""); int bug_idx5 = htm.indexOf(""); int bug_idx6 = htm.indexOf("