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:

  1. Start Character
    • Must begin with a letter (A–Z, a–z) or underscore (_)
    • Cannot start with a number or hyphen (-)
  2. Subsequent Characters
    • Letters (A–Z, a–z)
    • Digits (0–9)
    • Underscore (_)
    • Hyphen (-)
    • Period (.)

Definition

Namespace: DotMake.SvgSprite
Assembly: DotMake.SvgSprite (in DotMake.SvgSprite.dll) Version: 1.0.0
C#
public char IdReplacementChar { get; set; }

Property Value

Char

See Also