SvgSymbolOptionsIdReplacementChar Property
Gets or sets the replacement character when sanitizing the
id attribute when converting
<svg> tag to
<symbol> tag or vice versa.
Default value is '-'. Allowed values are '-', '_', '.'. Setting any other value will disable sanitizing.
The disallowed characters will be replaced with IdReplacementChar if it was set.
SVG uses XML rules for id attributes, so the allowed characters are:
-
Start Character
- Must begin with a letter (A–Z, a–z) or underscore (_)
- Cannot start with a number or hyphen (-)
-
Subsequent Characters
- Letters (A–Z, a–z)
- Digits (0–9)
- Underscore (_)
- Hyphen (-)
- Period (.)
Namespace: DotMake.SvgSpriteAssembly: DotMake.SvgSprite (in DotMake.SvgSprite.dll) Version: 1.0.0
public char IdReplacementChar { get; set; }
Property Value
Char