public void addInterMap(BufferedReader reader) throws IOException { String line; while ((line = reader.readLine()) != null) { int index = line.indexOf(" "); interWiki.put(line.substring(0, index), Encoder.escape(line .substring(index + 1))); }; }
/** * Encode special character c by replacing with it's hex character entity * code. */ protected void addSpecial(char c) { addSpecial("" + c, Encoder.toEntity(c)); }
public void handleMatch(StringBuffer buffer, MatchResult result) { String m = result.group(1); if ( "amp".equals(m)) { buffer.append("&"); } else if ( "gt".equals(m)) { buffer.append(">"); } else if ( "lt".equals(m)) { buffer.append("<"); } else { buffer.append(toChar(result.group(1))); } } }));
if (-1 != pipeIndex) alias = Encoder.unescape(name.substring(0, pipeIndex).trim()); name = name.substring(pipeIndex + 1).trim(); hash = Encoder.unescape(m.group(2)); char[] hashChars = hash.toCharArray(); int end = 0; String extSpace = Encoder.unescape(name.substring(atIndex + 1)); name = Encoder.unescape(name.substring(0, atIndex)); String view; if (-1 != pipeIndex) name = Encoder.unescape(name); buffer.append(Encoder.escape(name)); buffer.append(Encoder.escape(result.group(0)));
if (-1 != pipeIndex) alias = Encoder.unescape(name.substring(0, pipeIndex).trim()); name = name.substring(pipeIndex + 1).trim(); hash = Encoder.unescape(m.group(2)); char[] hashChars = hash.toCharArray(); int end = 0; String extSpace = Encoder.unescape(name.substring(atIndex + 1)); name = Encoder.unescape(name.substring(0, atIndex)); String view; if (-1 != pipeIndex) name = Encoder.unescape(name); buffer.append(Encoder.escape(name)); buffer.append(Encoder.escape(result.group(0)));
public void addInterMap(BufferedReader reader) throws IOException { String line; while ((line = reader.readLine()) != null) { int index = line.indexOf(" "); interWiki.put(line.substring(0, index), Encoder.escape(line .substring(index + 1))); }; }
/** * Encode special character c by replacing with it's hex character entity * code. */ protected void addSpecial(char c) { addSpecial("" + c, Encoder.toEntity(c)); }
public void handleMatch(StringBuffer buffer, MatchResult result) { String m = result.group(1); if ( "amp".equals(m)) { buffer.append("&"); } else if ( "gt".equals(m)) { buffer.append(">"); } else if ( "lt".equals(m)) { buffer.append("<"); } else { buffer.append(toChar(result.group(1))); } } }));
public void addMapping(BufferedReader reader) throws IOException { String line; while ((line = reader.readLine()) != null) { if (!line.startsWith("#")) //$NON-NLS-1$ { int index = line.indexOf(" "); //$NON-NLS-1$ services.put(line.substring(0, index), Encoder.escape(line .substring(index + 1))); } } }
public String handleMatch(MatchResult result, FilterContext context) { if (result.group(1) == null) { String match = result.group(2); if ("\\".equals(match)) { return "\\\\"; } return Encoder.toEntity(match.charAt(0)); } else { return "\"; } } }
public void addMapping(BufferedReader reader) throws IOException { String line; while ((line = reader.readLine()) != null) { if (!line.startsWith("#")) //$NON-NLS-1$ { int index = line.indexOf(" "); //$NON-NLS-1$ services.put(line.substring(0, index), Encoder.escape(line .substring(index + 1))); } } }
public void handleMatch(StringBuffer buffer, MatchResult result, FilterContext context) { buffer.append(result.group(1)); // Does our engine know images? RenderEngine engine = context.getRenderContext().getRenderEngine(); String externalImage = ""; if (engine instanceof ImageRenderEngine) { buffer.append(((ImageRenderEngine) engine).getExternalImageLink()); } buffer.append(formatter.format(new Object[] { externalImage, result.group(2), Encoder.toEntity(result.group(2).charAt(0)) + result.group(2).substring(1) })); return; } }
/** * Render the title from the given Channel to the given StringBuffer, * using CSS styled 'div' tags. In this case, the title will be enclosed * in a <div> with the class <code>rss.channel.title</code>. If * the channel includes a link, the title will be rendered as a link to * that URL, and the <a> tag will also be of class * <code>rss.channel.title</code> * @param feed the RSS Channel we retrieved via the Feed URL * @param buf the StringBuffer we're using to prepare the output * TODO Figure out how to stop Radeox from filtering the URLs */ private void renderTitleCSS(SyndFeed feed, StringBuffer buf) { buf.append(NEWLINE).append("<div class='rsschanneltitle'>"); if (feed.getLink() != null) { buf.append("<a class='rsschanneltitle' href=\"") .append(Encoder.escape(feed.getLink())) .append("\">"); } buf.append(feed.getTitle()); if (feed.getLink() != null) buf.append("</a>"); buf.append(NEWLINE).append("</div>"); }
public String handleMatch(MatchResult result, FilterContext context) { if (result.group(1) != null) { return "\"; } else if (result.group(4) != null ) { return "\n"; } else { String match = result.group(2); if (match == null) { match = result.group(3); } if ("\\".equals(match)) { return "\\\\"; } return Encoder.toEntity(match.charAt(0)); } }
writer.write(NEWLINE); writer.write("<form class='rsstextinputform' action=\""); writer.write(Encoder.escape(textInput.getLink())); writer.write("\" method=\"get\">"); writer.write(NEWLINE);
public void handleMatch(StringBuffer buffer, MatchResult result, FilterContext context) { buffer.append(result.group(1)); // Does our engine know images? RenderEngine engine = context.getRenderContext().getRenderEngine(); String externalImage = ""; if (engine instanceof ImageRenderEngine) { buffer.append(((ImageRenderEngine) engine).getExternalImageLink()); } buffer.append(formatter.format(new Object[] { externalImage, result.group(2), Encoder.toEntity(result.group(2).charAt(0)) + result.group(2).substring(1) })); return; } }