private static String stripOuterTags(String html, String tag, boolean inclusive) { ArrayList tags = new ArrayList(); tags.add(new String[]{tag, new Boolean(inclusive).toString(), "0"}); return stripOuterTags(html, tags, 0); }
private String getWikiMarkup(String title, String url) { title = HTMLUtils.stripTags(title).replace("[", "\\[").replace("]", "\\]").replace("|", "-"); url = url + ((!url.contains("?")) ? "?" : "&") + "utm_source=SAC&utm_medium=issuesuggestions"; StringBuilder result = new StringBuilder(); result.append("[").append(title).append(" | ").append(url).append("]").append("\n"); return result.toString(); } }
int newCounter = foundTag(html, count, tag, false); if (newCounter != -1) { tagValue = false; int newCounter = foundTag(html, count, tag, true); if (newCounter != -1) { tagValue = true; tagIncs.remove(listValue + 1); tagIncs.add(listValue + 1, nextInc); detagged.append(stripOuterTags(html, tagIncs, listValue + 1)); String[] tempTagIncs = (String[]) tagIncs.get(listValue); count = new Integer(tempTagIncs[2]).intValue();
contextParams.put("subscription", sub); contextParams.put("StringUtils", new StringUtils()); contextParams.put("HTMLUtils", new HTMLUtils()); contextParams.put("build", ComponentAccessor.getComponent(BuildUtilsInfo.class)); contextParams.put("textutils", new TextUtils());
int newCounter = foundTag(html, count, tag, false); if (newCounter != -1) int newCounter = foundTag(html, count, tag, true); if (newCounter != -1) tagIncs.remove(listValue + 1); tagIncs.add(listValue + 1, nextInc); detagged.append(stripOuterTags(html, tagIncs, listValue + 1)); String[] tempTagIncs = (String[]) tagIncs.get(listValue); count = new Integer(tempTagIncs[2]).intValue();
public static String stripOuterHtmlTags(String html) { List<String[]> tags = new ArrayList<String[]>(); tags.add(new String[]{"html", "true", "0"}); tags.add(new String[]{"head", "false", "0"}); tags.add(new String[]{"body", "true", "0"}); String result = stripOuterTags(html, tags, 0); return result.trim(); }
private static String stripOuterTags(String html, String tag, boolean inclusive) { List<String[]> tags = new ArrayList<String[]>(); tags.add(new String[]{tag, new Boolean(inclusive).toString(), "0"}); return stripOuterTags(html, tags, 0); }
public static String stripOuterHtmlTags(String html) { ArrayList tags = new ArrayList(); tags.add(new String[]{"html", "true", "0"}); tags.add(new String[]{"head", "false", "0"}); tags.add(new String[]{"body", "true", "0"}); String result = stripOuterTags(html, tags, 0); return result.trim(); }