fix: support spaced emoji media attributes
This commit is contained in:
@@ -36,7 +36,11 @@ def _is_usable_local_media_path(value: str) -> bool:
|
||||
def _extract_emoji_preview_url(xml_text: str) -> str:
|
||||
if not xml_text:
|
||||
return ''
|
||||
patterns = (r'cdnurl="([^"]+)"', r'encrypturl="([^"]+)"', r'externurl="([^"]+)"')
|
||||
patterns = (
|
||||
r'cdnurl\s*=\s*"([^"]+)"',
|
||||
r'encrypturl\s*=\s*"([^"]+)"',
|
||||
r'externurl\s*=\s*"([^"]+)"'
|
||||
)
|
||||
for pattern in patterns:
|
||||
match = re.search(pattern, xml_text)
|
||||
if match:
|
||||
|
||||
Reference in New Issue
Block a user