Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

missing closing ^Q on inline code markdown #1770

Open
emorrp1 opened this issue Aug 10, 2023 · 2 comments
Open

missing closing ^Q on inline code markdown #1770

emorrp1 opened this issue Aug 10, 2023 · 2 comments
Labels
T-Defect Bugs, crashes, hangs, vulnerabilities, or other reported problems.

Comments

@emorrp1
Copy link

emorrp1 commented Aug 10, 2023

Sent with flatpak Element: 1.11.33 to OFTC BridgeVersion: 1.0.1 in markdown composer, the relevant code seems to be formatting.ts. Reporting because I'd like to not annoy IRC users (having recently been bitten by pastebin behaviour change).

10/08/2023, 08:17:52 - emorrp1: TIL (via #licenses) a thorough description/animation of catastrophic regex backtracking "x=x" with /.*.*=.*/ and fixing with state automata https://blog.cloudflare.com/details-of-the-cloudflare-outage-on-july-2-2019/#appendix-about-regular-expression-backtracking
10/08/2023, 08:23:21 - _jwilk: BTW, I wonder it's my or emorrp1's IRC client misbehaving, because there's only one ^Q in that message.
10/08/2023, 08:25:25 - emorrp1: it'll be mine (markdown maybe?), not yours, but what's a ^Q?
10/08/2023, 08:25:42 - _jwilk: https://modern.ircdocs.horse/formatting.html#monospace
10/08/2023, 08:25:46 - Unit193: _jwilk: It's a common Matrix thing.
10/08/2023, 08:26:50 - _jwilk: Unit193: So no hope it will be ever fixed? :]
10/08/2023, 08:27:12 - Unit193: That's how it goes.

{
  "type": "m.room.message",
  "sender": "@emorrp1:freedombox.emorrp1.name",
  "content": {
    "msgtype": "m.text",
    "body": "TIL (via #licenses) a thorough description/animation of catastrophic regex backtracking `\"x=x\" with /.*.*=.*/` and fixing with state automata https://blog.cloudflare.com/details-of-the-cloudflare-outage-on-july-2-2019/#appendix-about-regular-expression-backtracking",
    "format": "org.matrix.custom.html",
    "formatted_body": "TIL (via #licenses) a thorough description/animation of catastrophic regex backtracking <code>\"x=x\" with /.*.*=.*/</code> and fixing with state automata https://blog.cloudflare.com/details-of-the-cloudflare-outage-on-july-2-2019/#appendix-about-regular-expression-backtracking"
  },
  "event_id": "$169165187216UHnGX:freedombox.emorrp1.name",
  "origin_server_ts": 1691651872129,
  "unsigned": {
    "age": 963,
    "transaction_id": "m1691651871635.528"
  },
  "room_id": "!YKqCOOCDNoKQrdYRlj:matrix.org"
}
@Half-Shot Half-Shot added the T-Defect Bugs, crashes, hangs, vulnerabilities, or other reported problems. label Aug 14, 2023
@Half-Shot
Copy link
Contributor

I was unable to reproduce when testing, and we do have a unit test for this one. Very odd.

@jwilk
Copy link

jwilk commented Aug 18, 2023

The trouble is that Matrix uses ^Q (\u0011) to start monospace, but ^O (\u000F) to end it.
Irssi before 1.4.4 (irssi/irssi#1442) didn't support ^Q (it would show up as Q with inverted colors), but it did support ^O.
So if you have an old Irssi (like me), you see only where monospace was supposed to start, but not where it was supposed to end.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T-Defect Bugs, crashes, hangs, vulnerabilities, or other reported problems.
Projects
None yet
Development

No branches or pull requests

3 participants