Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

HV-873 Clarifying scope of @SafeHtml constraint in JavaDocs

  • Loading branch information...
commit 0972d34f8d7ca308f24a3665da1cd4191f68f95c 1 parent ccc75d5
@gunnarmorling gunnarmorling authored
View
4 engine/src/main/java/org/hibernate/validator/constraints/SafeHtml.java
@@ -33,6 +33,10 @@
/**
* Validate a rich text value provided by the user to ensure that it contains no malicious code, such as embedded
* <script> elements.
+ * <p>
+ * Note that this constraint assumes you want to validate input which represents a body fragment of an HTML document. If
+ * you instead want to validate input which represents a complete HTML document, add the {@code html}, {@code head} and
+ * {@code body} tags to the used whitelist as required.
*
* @author George Gastaldi
*/
Please sign in to comment.
Something went wrong with that request. Please try again.