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

Links should not be generated inside <code> #18790

Closed
ttiurani opened this issue Aug 26, 2021 · 1 comment
Closed

Links should not be generated inside <code> #18790

ttiurani opened this issue Aug 26, 2021 · 1 comment
Labels
A-Timeline O-Occasional Affects or can be seen by some users regularly or most users rarely S-Minor Impairs non-critical functionality or suitable workarounds exist T-Defect Z-Papercuts Visible. Impactful. Predictable to action.

Comments

@ttiurani
Copy link

ttiurani commented Aug 26, 2021

Steps to reproduce

I'm trying to separate code from normal text with backticks, like for example:

Running `./manage.py migrate` gives...

What happened?

I get:

Running <code>./<a href="http://manage.py">manage.py</a> migrate</code> gives...

Screenshot from 2021-08-26 11-52-15

Source for above screenshot:

  "content": {
    "body": " * testing.com `testing.com`\n```\ntesting.com\n```",
    "format": "org.matrix.custom.html",
    "formatted_body": " * <p>testing.com <code>testing.com</code></p>\n<pre><code>testing.com\n</code></pre>\n",
    "m.new_content": {
      "body": "testing.com `testing.com`\n```\ntesting.com\n```",
      "format": "org.matrix.custom.html",
      "formatted_body": "<p>testing.com <code>testing.com</code></p>\n<pre><code>testing.com\n</code></pre>\n",
      "msgtype": "m.text"
    }

What did you expect?

I would expect that it would result in

Running <code>./manage.py migrate</code> gives...

Meaning I would expect Element to either skip link generation completely inside <code> or then only create a link in the presence of a complete URL like https://manage.py.

Operating system

OSX

Browser information

Firefox 91.0.2

URL for webapp

No response

Homeserver

v1.8.1

Have you submitted a rageshake?

No

@kittykat kittykat added O-Occasional Affects or can be seen by some users regularly or most users rarely S-Minor Impairs non-critical functionality or suitable workarounds exist Z-Papercuts Visible. Impactful. Predictable to action. A-Timeline labels Aug 26, 2021
@robintown
Copy link
Member

Duplicate of #9613

@robintown robintown marked this as a duplicate of #9613 Aug 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Timeline O-Occasional Affects or can be seen by some users regularly or most users rarely S-Minor Impairs non-critical functionality or suitable workarounds exist T-Defect Z-Papercuts Visible. Impactful. Predictable to action.
Projects
None yet
Development

No branches or pull requests

3 participants