Skip to content

Commit 88ca24d

Browse files
authored
Fixed HTML-encoded sign & in the calendar url (#5588)
1 parent a038761 commit 88ca24d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

custom_components/waste_collection_schedule/waste_collection_schedule/source/ekosystem_wroc_pl.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import datetime
22
import json
3+
import html
34
import re
45
from urllib.parse import urlparse, parse_qsl
56

@@ -67,7 +68,7 @@ def extract_calendar_data(self, data: dict) -> dict:
6768
match = self._calendar_url_pattern.search(message)
6869
if not match:
6970
raise Exception(f"Error: a message {message} does not contain a valid calendar url!")
70-
calendar_url = match.group(1)
71+
calendar_url = html.unescape(match.group(1))
7172
parsed_url = urlparse(calendar_url)
7273
params_list = parse_qsl(parsed_url.query)
7374
return {k: v for (k, v) in params_list}

0 commit comments

Comments
 (0)