]> jfr.im git - yt-dlp.git/blobdiff - yt_dlp/extractor/common.py
[cleanup] Lint and misc cleanup
[yt-dlp.git] / yt_dlp / extractor / common.py
index 84a2b95af5fd4ce124615873957e4635baabc901..20ed5221637df16b1eb7eff9f875a28ccf13dc78 100644 (file)
@@ -3725,7 +3725,8 @@ def description(cls, *, markdown=True, search_examples=None):
         if not cls.working():
             desc += ' (**Currently broken**)' if markdown else ' (Currently broken)'
 
-        name = f' - **{cls.IE_NAME}**' if markdown else cls.IE_NAME
+        # Escape emojis. Ref: https://github.com/github/markup/issues/1153
+        name = (' - **%s**' % re.sub(r':(\w+:)', ':\u200B\\g<1>', cls.IE_NAME)) if markdown else cls.IE_NAME
         return f'{name}:{desc}' if desc else name
 
     def extract_subtitles(self, *args, **kwargs):