Skip to content

Commit 33d582d

Browse files
committed
Handle escaped character references in protocol comments
1 parent f42095a commit 33d582d

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1515
- Generated code now sets `EoWriter.string_sanitization_mode` during serialization.
1616
- For more information, see
1717
[Chunked Reading: Sanitization](https://github.com/Cirras/eo-protocol/blob/master/docs/chunks.md#sanitization).
18+
- Escaped character references appearing in docstrings and downstream generated documentation.
1819

1920
## [1.1.1] - 2024-08-22
2021

protocol_code_generator/util/xml_utils.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
from xml.etree.ElementTree import Element
2+
from html import unescape
23

34

45
def get_instructions(element):
@@ -32,7 +33,7 @@ def get_text(element):
3233
raise RuntimeError(f'Unexpected text content "{text}"')
3334
result = text
3435

35-
return result if result else None
36+
return unescape(result) if result else None
3637

3738

3839
def get_string_attribute(element, name, default_value=None):

0 commit comments

Comments
 (0)