Examples of SafeHtmlValidator


Examples of org.hibernate.validator.internal.constraintvalidators.hv.SafeHtmlValidator

  @Test
  @TestForIssue(jiraKey = "HV-817")
  public void testDivNotAllowedInBasicWhiteList() throws Exception {
    descriptor.setValue( "whitelistType", WhiteListType.BASIC );

    SafeHtmlValidator validator = getSafeHtmlValidator();
    assertFalse( validator.isValid( "<div>test</div>", null ) );
  }
View Full Code Here

Examples of org.hibernate.validator.internal.constraintvalidators.hv.SafeHtmlValidator

    assertTrue( getSafeHtmlValidator().isValid( "Foobar", null ) );
  }

  private SafeHtmlValidator getSafeHtmlValidator() {
    SafeHtml p = AnnotationFactory.create( descriptor );
    SafeHtmlValidator validator = new SafeHtmlValidator();
    validator.initialize( p );
    return validator;
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.