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

whitelist mxc:// URLs in img tags in html msgs #1641

Open
ara4n opened this issue Nov 6, 2017 · 4 comments
Open

whitelist mxc:// URLs in img tags in html msgs #1641

ara4n opened this issue Nov 6, 2017 · 4 comments
Labels
markdown P2 parity-with-web T-Enhancement New features, changes in functionality, performance boosts, user-facing improvements

Comments

@ara4n
Copy link
Member

ara4n commented Nov 6, 2017

for parity with web so that custom emoji etc work

@anoadragon453
Copy link
Member

On ponies.im we have started implementing custom emoji, and yes our iOS users cannot participate.

Web:
2018-03-24-181016

iOS:
image

@manuroe
Copy link
Member

manuroe commented Sep 10, 2018

One example of such event can be found at
https://riot.im/develop/#/room/#riot-ios:matrix.org/$15365682994513Vtcfe:maunium.net

  "content": {
    "body": "text\n![image](mxc://maunium.net/LVIVUOpCxwnIKabeYaQuXApF)\ntext",
    "msgtype": "m.text",
    "formatted_body": "text<br /><img src=\"mxc://maunium.net/LVIVUOpCxwnIKabeYaQuXApF\" alt=\"image\" /><br />text",
    "format": "org.matrix.custom.html"
  },

@manuroe
Copy link
Member

manuroe commented Sep 10, 2018

Need some investigations.
Rendering html things is limited in the app. A full support like will require to display a web view in each cell of the table view. This may kill the app performance.

@manuroe manuroe added T-Enhancement New features, changes in functionality, performance boosts, user-facing improvements P2 markdown parity-with-web labels Sep 10, 2018
@arychj
Copy link

arychj commented May 18, 2023

How is this still unresolved after five years? This seems like basic functionality; these are Matrix resources the app should be able to display them.

Web is giving this:

{
  ...
  "content": {
    "body": "test: ",
    "msgtype": "m.text",
    "format": "org.matrix.custom.html",
    "formatted_body": "test: <img src=\"mxc://example.org/jEdZNvMYXbWhYxEWjuEUdidL\"/>"
  },
  ...
}

While iOS is giving this:

{
  ...
  "content" : {
    "body" : "test: ",
    "msgtype" : "m.text",
    "format" : "org.matrix.custom.html",
    "formatted_body" : "test: <img src=\"mxc:\/\/example.org\/jEdZNvMYXbWhYxEWjuEUdidL\"\/>"
  },
  ...
}

We're trying to adopt Matrix as alternative to Slack, but without the ability for our apps to include images in formatted messages we're going to have to look for an alternative solution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
markdown P2 parity-with-web T-Enhancement New features, changes in functionality, performance boosts, user-facing improvements
Projects
None yet
Development

No branches or pull requests

4 participants