diff --git a/concordia/contrib/components/game_master/forum.py b/concordia/contrib/components/game_master/forum.py index 4cddd01ae..43386638f 100644 --- a/concordia/contrib/components/game_master/forum.py +++ b/concordia/contrib/components/game_master/forum.py @@ -413,8 +413,11 @@ def _render_post_image(self, post: Post) -> str: if post.image and post.image.startswith('!['): src = self._extract_image_src(post.image) if src: + safe_src = self._escape_html(src) + if not any(src.lower().startswith(scheme) for scheme in ('https://', 'http://', 'data:image/')): + return '' return ( - f'