Package org.xwiki.velocity.tools
Class CSSIdentifierSerializer
- java.lang.Object
-
- org.xwiki.velocity.tools.CSSIdentifierSerializer
-
public class CSSIdentifierSerializer extends Object
Implements the specification regarding CSS identifier serialization.See https://drafts.csswg.org/cssom/#serialize-an-identifier
- Since:
- 6.4.7, 7.1.4, 7.4M1
- Version:
- $Id: 6976ae319d22d88f97daac9e8216c5567f7e1f6c $
-
-
Constructor Summary
Constructors Constructor Description CSSIdentifierSerializer()
-
-
-
Method Detail
-
serialize
public String serialize(String identifier)
Serialize a CSS identifier.NOTE: This code was adapted from Mathias Bynens' CSS.escape polyfill, available under the MIT license.
See https://drafts.csswg.org/cssom/#serialize-an-identifier and https://github.com/mathiasbynens/CSS.escape.
- Parameters:
identifier
- the identifier to serialize- Returns:
- the serialized identifier
- Throws:
IllegalArgumentException
- if the input contains U+0000
-
-