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

fix malformed external media link label that contain newline #377

Merged
merged 2 commits into from
Dec 25, 2023

Conversation

asdfzdfj
Copy link
Contributor

if the external media in federated content contains newline in its name property, typically the image alt text, then the created link will be malformed

this change just replaced all the newlines in them with a space

it'll be something like this

- broken, the link is not rendered
![mark
with
a
gun](https://whatever.domain/the/image/is.png)
- this patch, the link renders properly
![mark with a gun](https://whatever.domain/the/image/is.png)

if the external media in federated content contains newline in its
`name` property, typically the image alt text, then the created link
will be malformed

this change just replaced all the newlines in them with a space

it'll be something like this
```
- broken
![mark
with
a
gun](https://whatever.domain/the/image/is.png)

- this patch
![mark with a gun](https://whatever.domain/the/image/is.png)

```
@nobodyatroot nobodyatroot added activitypub ActivityPub related issues backend Backend related issues and pull requests labels Dec 24, 2023
@asdfzdfj asdfzdfj merged commit bab3ab0 into main Dec 25, 2023
7 checks passed
@asdfzdfj asdfzdfj deleted the fix/external-media-newline-in-label branch December 25, 2023 04:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
activitypub ActivityPub related issues backend Backend related issues and pull requests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants