Example usage for com.vaadin.server JsonPaintTarget escapeXML

List of usage examples for com.vaadin.server JsonPaintTarget escapeXML

Introduction

In this page you can find the example usage for com.vaadin.server JsonPaintTarget escapeXML.

Prototype

static StringBuilder escapeXML(StringBuilder xml) 

Source Link

Document

Substitutes the XML sensitive characters with predefined XML entities.

Usage

From source file:com.javalego.ui.vaadin.component.confirmdialog.ConfirmDialog.java

/**
 * Format the messageLabel by maintaining text only.
 * /*from w w w . jav  a  2  s .  com*/
 * @param text
 * @return
 */
protected final String formatDialogMessage(final String text) {
    return JsonPaintTarget.escapeXML(text).replaceAll("\n", "<br />");
}