sky-music / sky-python-music-sheet-maker

Make visual music sheets for thatskygame (graphical representations of the Sky keyboard)
MIT License
29 stars 10 forks source link

Escape # of HTML color codes #251

Closed jmmelko closed 2 years ago

jmmelko commented 2 years ago

Special characters in HTML code in input files should be escaped.

especialy the comment character

(currently #)

jmmelko commented 2 years ago

See line 362 of song_parser.py

Special characters: " ' % # & < >

jmmelko commented 2 years ago

Characters to be escaped in RegEx:

Brackets: [] Parentheses: () Curly braces: {} Operators: *, +, ?, | Anchors: ^, $ Others: ., \ In order to use a literal ^ at the start or a literal $ at the end of a regex, the character must be escaped. Some flavors only use ^ and $ as metacharacters when they are at the start or end of the regex respectively. In those flavors, no additional escaping is necessary. It's usually just best to escape them anyway.

jmmelko commented 2 years ago

Fixed as long as html color code does not include space (blank)