Interface Config.CharacterReferenceEncodingBehaviour

Enclosing class:
Config

public static interface Config.CharacterReferenceEncodingBehaviour
Specifies the interface for defining character reference encoding behaviour.

The default implementation Config.DEFAULT_CHARACTER_REFERENCE_ENCODING_BEHAVIOUR is suitable for the vast majority of circumstances, so this interface is almost never used directly.

The currently active encoding behaviour is stored in the static Config.CurrentCharacterReferenceEncodingBehaviour property.

  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    isEncoded(char ch, boolean insideAttributeValue)
    Determines whether the specified character is to be encoded in the specified context.
  • Method Details

    • isEncoded

      boolean isEncoded(char ch, boolean insideAttributeValue)
      Determines whether the specified character is to be encoded in the specified context.
      Parameters:
      ch - the candidate character.
      insideAttributeValue - specifies whether the output must be valid inside a quoted attribute value.
      Returns:
      true if the specified character is to be encoded in the specified context, otherwise false.