Package org.hibernate.validator.internal.constraintvalidators.hv

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


    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

Related Classes of org.hibernate.validator.internal.constraintvalidators.hv.SafeHtmlValidator

Copyright © 2018 www.massapicom. 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.