matrix-org / matrix-org/matrix-hookshot

Matrix Hookshot doesn't send correctly formatted HTML for GitHub releases when Markdown isn't used

Open
#311 5 comments 0 reactions 0 assignees View on GitHub
GitHub T-Defect
Dominant language
TypeScript
Stars
450
Forks
95
Avg merge
1d 2h
Merged PRs (30d)
23

Description

**Describe the bug**
I have bot that publishes releases for [one of my projects](/makedeb/makedeb), and part of that behavior involves automatically parsing my markdown file and getting the needed sections from it.

I'm using a Python library to do such (BeautifulSoup in particular), and I thus need to convert my markdown to html for it to be processed. Likewise, after I get my needed code, I publish my releases notes as raw HTML from the content in my markdown file, and there's thus (presumably) no markdown code itself in the releases.

Matrix Hookshot seems to be getting this raw HTML and escaping it or something, as upon viewing it in my room, I'm seeing raw HTML and not formatted HTML like I'd expect.

**To Reproduce**
1. Make a GitHub release with raw HTML
2. See raw HTML in Matrix client

**Expected behavior**
Formatted HTML

**Screenshots**
![image](https://user-images.githubusercontent.com/74838472/163693886-a979271f-5fe3-4c8f-87dd-cb5e655b21c0.png)

**Desktop (please complete the following information):**
- OS: Ubuntu 20.04
- Browser: Element Desktop
- Version: 1.10.10

**Additional context**
N/A

Contributor guide

Open the contributing guide

Research direction

Begin by locating the GitHub release handling and the HTML conversion or escaping path; no file or test is identified in the report. Reproduce with a release whose notes contain raw HTML, then verify in Element that the release appears as formatted HTML rather than literal tags.

Written by the indexing model from the issue text.

Assessment

Tech stack
github, typescript
Domain
backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.