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

hoste.weblate.org - links get mangled #6258

Closed
licaon-kter opened this issue Jul 5, 2021 · 10 comments
Closed

hoste.weblate.org - links get mangled #6258

licaon-kter opened this issue Jul 5, 2021 · 10 comments
Assignees
Labels
enhancement Adding or requesting a new feature.
Milestone

Comments

@licaon-kter
Copy link
Contributor

Steps to reproduce the behavior:

  1. Go to https://hosted.weblate.org/translate/f-droid/website-posts/ro/?checksum=3155de3b1a1a0cde&sort_by=-priority,position#nearby
  2. Fix the end link with the proper one from source string
  3. Click on approve or for review
  4. Save
  5. See translated string as ...Weblate F-Droid (<https:>).</https:>

Expected behavior

Translated string should be ...Weblate F-Droid (<https://hosted.weblate.org/languages/ro/f-droid/>).

@eighthave
Copy link
Contributor

We've been getting a lot of these on the Markdown/gettext sections of f-droid.org (f-droid/weblate-page, f-droid/weblate-posts, f-droid/weblate-docs). I have a utility script to catch them when I merge. The existing Weblate link checkers do mark these cases.

@nijel
Copy link
Member

nijel commented Jul 7, 2021

In this case, it is caused by safe-html flag - it treats the content as HTML, and performs cleanup on the string:

obrazek

Using safe-html flag on non-HTML content can cause such issues.

@nijel nijel added the question This is more a question for the support than an issue. label Jul 7, 2021
@github-actions
Copy link

github-actions bot commented Jul 7, 2021

This issue looks more like a support question than an issue. We strive to answer these reasonably fast, but purchasing the support subscription is not only more responsible and faster for your business but also makes Weblate stronger.

In case your question is already answered, making a donation is the right way to say thank you!

@licaon-kter
Copy link
Contributor Author

@nijel where is that controlled?

@eighthave
Copy link
Contributor

eighthave commented Jul 7, 2021 via email

@eighthave
Copy link
Contributor

eighthave commented Jul 7, 2021 via email

@github-actions
Copy link

This issue has been automatically marked as stale because there wasn’t any recent activity.

It will be closed soon if no further action occurs.

Thank you for your contributions!

@github-actions github-actions bot added the wontfix Nobody will work on this. label Jul 18, 2021
@eighthave
Copy link
Contributor

I wonder if the safe_html plugin could be made to ignore the Markdown links. It seems like a pretty safe pattern: r'<https?://[^>]+>'

@nijel nijel added enhancement Adding or requesting a new feature. and removed question This is more a question for the support than an issue. wontfix Nobody will work on this. labels Oct 13, 2021
@nijel nijel self-assigned this Oct 13, 2021
@nijel nijel added this to the 4.9 milestone Oct 13, 2021
@nijel nijel reopened this Oct 13, 2021
@nijel nijel closed this as completed in 194bdca Oct 13, 2021
@github-actions
Copy link

Thank you for your report; the issue you have reported has just been fixed.

  • In case you see a problem with the fix, please comment on this issue.
  • In case you see a similar problem, please open a separate issue.
  • If you are happy with the outcome, don’t hesitate to support Weblate by making a donation.

@eighthave
Copy link
Contributor

Amazing, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Adding or requesting a new feature.
Projects
None yet
Development

No branches or pull requests

3 participants