Search in sources :

Example 6 with WPhoneNumberField

use of com.github.bordertech.wcomponents.WPhoneNumberField in project wcomponents by BorderTech.

the class WPhoneNumberFieldRenderer_Test method testXssEscaping.

@Test
public void testXssEscaping() throws IOException, SAXException, XpathException {
    WPhoneNumberField field = new WPhoneNumberField();
    field.setText(getMaliciousContent());
    assertSafeContent(field);
    field.setToolTip(getMaliciousAttribute("ui:phonenumberfield"));
    assertSafeContent(field);
    field.setAccessibleText(getMaliciousAttribute("ui:phonenumberfield"));
    assertSafeContent(field);
}
Also used : WPhoneNumberField(com.github.bordertech.wcomponents.WPhoneNumberField) Test(org.junit.Test)

Aggregations

WPhoneNumberField (com.github.bordertech.wcomponents.WPhoneNumberField)6 Test (org.junit.Test)4 WSuggestions (com.github.bordertech.wcomponents.WSuggestions)2 RadioButtonGroup (com.github.bordertech.wcomponents.RadioButtonGroup)1 WButton (com.github.bordertech.wcomponents.WButton)1 WCheckBox (com.github.bordertech.wcomponents.WCheckBox)1 WCheckBoxSelect (com.github.bordertech.wcomponents.WCheckBoxSelect)1 WComponent (com.github.bordertech.wcomponents.WComponent)1 WContainer (com.github.bordertech.wcomponents.WContainer)1 WDateField (com.github.bordertech.wcomponents.WDateField)1 WDropdown (com.github.bordertech.wcomponents.WDropdown)1 WEmailField (com.github.bordertech.wcomponents.WEmailField)1 WFieldLayout (com.github.bordertech.wcomponents.WFieldLayout)1 WFieldSet (com.github.bordertech.wcomponents.WFieldSet)1 WLabel (com.github.bordertech.wcomponents.WLabel)1 WMultiSelect (com.github.bordertech.wcomponents.WMultiSelect)1 WMultiSelectPair (com.github.bordertech.wcomponents.WMultiSelectPair)1 WNumberField (com.github.bordertech.wcomponents.WNumberField)1 WPartialDateField (com.github.bordertech.wcomponents.WPartialDateField)1 WPasswordField (com.github.bordertech.wcomponents.WPasswordField)1