@Override protected void notifyContentKind(ContentKind kind) throws IOException { // |truncate converts all input to TEXT, so label the output appendable as such. This isn't // strictly necessary, as the autoescaper will have already made sure the output is properly // escaped, but it helps make the intent clear. delegate.setSanitizedContentKind(ContentKind.TEXT); }
@Override protected void notifyContentKind(ContentKind kind) throws IOException { // |truncate converts all input to TEXT, so label the output appendable as such. This isn't // strictly necessary, as the autoescaper will have already made sure the output is properly // escaped, but it helps make the intent clear. delegate.setSanitizedContentKind(ContentKind.TEXT); }
@Override protected void notifyContentKind(ContentKind kind) throws IOException { delegate.setSanitizedContentKind(kind); }
@Override protected void notifyContentKind(ContentKind kind) throws IOException { delegate.setSanitizedContentKind(kind); }
@Override protected void notifyContentKind(ContentKind kind) throws IOException { delegate.setSanitizedContentKind(kind); buffer.setSanitizedContentKind(kind); }
@Override protected void notifyContentKind(ContentKind kind) throws IOException { if (isInHtml()) { activeAppendable = delegate; delegate.setSanitizedContentKind(kind); } }
@Override protected void notifyContentKind(ContentKind kind) throws IOException { if (isInHtml()) { activeAppendable = delegate; delegate.setSanitizedContentKind(kind); } }
@Override protected void notifyContentKind(ContentKind kind) throws IOException { delegate.setSanitizedContentKind(kind); buffer.setSanitizedContentKind(kind); }
@Override public void render(LoggingAdvisingAppendable appendable) throws IOException { appendable .setSanitizedContentKind(getContentKind()) .setSanitizedContentDirectionality(getContentDirection()); thunk.render(appendable); }
@Override public void render(LoggingAdvisingAppendable appendable) throws IOException { appendable .setSanitizedContentKind(getContentKind()) .setSanitizedContentDirectionality(getContentDirection()) .append(content); }
@Override public void render(LoggingAdvisingAppendable appendable) throws IOException { appendable .setSanitizedContentKind(getContentKind()) .setSanitizedContentDirectionality(getContentDirection()) .append(content); }
@Override public void close() throws IOException { if (!isInHtml()) { StringBuilder buffer = (StringBuilder) activeAppendable; if (buffer.length() > 0) { SanitizedContent content = cleanHtml(buffer.toString(), getSanitizedContentDirectionality(), optionalSafeTags); delegate .setSanitizedContentKind(content.getContentKind()) .setSanitizedContentDirectionality(content.getContentDirection()) .append(content.getContent()); buffer.setLength(0); } } } }
@Override public void close() throws IOException { if (!isInHtml()) { StringBuilder buffer = (StringBuilder) activeAppendable; if (buffer.length() > 0) { SanitizedContent content = cleanHtml(buffer.toString(), getSanitizedContentDirectionality(), optionalSafeTags); delegate .setSanitizedContentKind(content.getContentKind()) .setSanitizedContentDirectionality(content.getContentDirection()) .append(content.getContent()); buffer.setLength(0); } } } }
public void replayOn(LoggingAdvisingAppendable appendable) throws IOException { if (commands != null) { for (Object o : getCommandsAndAddPendingStringData()) { if (o instanceof String) { appendable.append((String) o); } else if (o instanceof LoggingFunctionCommand) { ((LoggingFunctionCommand) o).replayOn(appendable); } else if (o == EXIT_LOG_STATEMENT_MARKER) { appendable.exitLoggableElement(); } else if (o instanceof LogStatement) { appendable.enterLoggableElement((LogStatement) o); } else if (o instanceof ContentKind) { appendable.setSanitizedContentKind((ContentKind) o); } else if (o instanceof Dir) { appendable.setSanitizedContentDirectionality((Dir) o); } else if (o == SET_SANITIZED_CONTENT_DIRECTIONALITY_NULL_MARKER) { appendable.setSanitizedContentDirectionality(null); } else { throw new AssertionError("unexpected command object: " + o); } } } else { appendable.append(delegate); } }
public void replayOn(LoggingAdvisingAppendable appendable) throws IOException { if (commands != null) { for (Object o : getCommandsAndAddPendingStringData()) { if (o instanceof String) { appendable.append((String) o); } else if (o instanceof LoggingFunctionCommand) { ((LoggingFunctionCommand) o).replayOn(appendable); } else if (o == EXIT_LOG_STATEMENT_MARKER) { appendable.exitLoggableElement(); } else if (o instanceof LogStatement) { appendable.enterLoggableElement((LogStatement) o); } else if (o instanceof ContentKind) { appendable.setSanitizedContentKind((ContentKind) o); } else if (o instanceof Dir) { appendable.setSanitizedContentDirectionality((Dir) o); } else if (o == SET_SANITIZED_CONTENT_DIRECTIONALITY_NULL_MARKER) { appendable.setSanitizedContentDirectionality(null); } else { throw new AssertionError("unexpected command object: " + o); } } } else { appendable.append(delegate); } }