Fix importing blueprint from community (#44104)
This commit is contained in:
parent
d9a86c1145
commit
0da312b6f1
2 changed files with 3 additions and 2 deletions
|
@ -108,10 +108,10 @@ def _extract_blueprint_from_community_topic(
|
|||
if block_syntax not in ("auto", "yaml"):
|
||||
continue
|
||||
|
||||
block_content = block_content.strip()
|
||||
block_content = html.unescape(block_content.strip())
|
||||
|
||||
try:
|
||||
data = yaml.parse_yaml(html.unescape(block_content))
|
||||
data = yaml.parse_yaml(block_content)
|
||||
except HomeAssistantError:
|
||||
if block_syntax == "yaml":
|
||||
raise
|
||||
|
|
|
@ -173,6 +173,7 @@ async def test_fetch_blueprint_from_community_url(hass, aioclient_mock, communit
|
|||
imported_blueprint.blueprint.metadata["source_url"]
|
||||
== "https://community.home-assistant.io/t/test-topic/123/2"
|
||||
)
|
||||
assert "gt;" not in imported_blueprint.raw_data
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
|
|
Loading…
Add table
Reference in a new issue