summaryrefslogtreecommitdiffstats
path: root/shared/src
diff options
context:
space:
mode:
authorLeif Åstrand <legioth@gmail.com>2017-12-01 09:30:43 +0200
committerGitHub <noreply@github.com>2017-12-01 09:30:43 +0200
commit845daf7853762e81685f8ed0db6639c242f950fb (patch)
tree772b0cf7296d08827dd4f40ce9cabd47563f790e /shared/src
parentb153099d4e33d3f9ed6698286cce5b483bb8ee30 (diff)
downloadvaadin-framework-845daf7853762e81685f8ed0db6639c242f950fb.tar.gz
vaadin-framework-845daf7853762e81685f8ed0db6639c242f950fb.zip
Clarify ContentMode javadocs (#10395)
* Don't refer to Label * Explicitly mention XSS risk with HTML
Diffstat (limited to 'shared/src')
-rw-r--r--shared/src/main/java/com/vaadin/shared/ui/ContentMode.java11
1 files changed, 6 insertions, 5 deletions
diff --git a/shared/src/main/java/com/vaadin/shared/ui/ContentMode.java b/shared/src/main/java/com/vaadin/shared/ui/ContentMode.java
index 4c604f4291..4808935658 100644
--- a/shared/src/main/java/com/vaadin/shared/ui/ContentMode.java
+++ b/shared/src/main/java/com/vaadin/shared/ui/ContentMode.java
@@ -16,24 +16,25 @@
package com.vaadin.shared.ui;
/**
- * Content modes defining how the client should interpret a Label's value.
+ * Defines how the client should interpret textual values.
*
* @since 8.0
*/
public enum ContentMode {
/**
- * Content mode, where the label contains only plain text.
+ * Textual values are displayed as plain text.
*/
TEXT,
/**
- * Content mode, where the label contains preformatted text. In this mode
- * newlines are preserved when rendered on the screen.
+ * Textual values are displayed as preformatted text. In this mode newlines
+ * are preserved when rendered on the screen.
*/
PREFORMATTED,
/**
- * Content mode, where the label contains HTML.
+ * Textual values are interpreted and displayed as HTML. Care should be
+ * taken when using this mode to avoid Cross-site Scripting (XSS) issues.
*/
HTML