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

Long Links in PDFs are not wrapped around #1904

Closed
Tracked by #1533
nassabay opened this issue Nov 28, 2022 · 4 comments · Fixed by #2164
Closed
Tracked by #1533

Long Links in PDFs are not wrapped around #1904

nassabay opened this issue Nov 28, 2022 · 4 comments · Fixed by #2164
Assignees
Labels
‼️ prio: high Needs to be resolved ASAP. 🐛 bug Something isn't working ☺️ effort: low Should be doable in <4h
Milestone

Comments

@nassabay
Copy link

Describe the Bug

if a Link is longer than 1 line, it just runs over the line break

Steps to Reproduce

  1. Go to 'Kreis Soest'
  2. Click on 'PDF erstellen'
  3. In the PDF Links run over the line end.

Expected Behavior

Line break in Link

Actual Behavior

No Link break in Link

Screenshot (804)

Additional Information

Traceback
@nassabay nassabay added the 🐛 bug Something isn't working label Nov 28, 2022
@nassabay nassabay modified the milestone: Meta Issues Nov 28, 2022
@timobrembeck timobrembeck added this to the 23Q1 milestone Nov 28, 2022
@timobrembeck timobrembeck added ⁉️ prio: low Not urgent, can be resolved in the distant future. ☺️ effort: low Should be doable in <4h labels Nov 28, 2022
@ztefanie ztefanie mentioned this issue Nov 29, 2022
33 tasks
@mael-fosso
Copy link
Contributor

mael-fosso commented Jan 25, 2023

wo in cms kann ich diese Seite zugreifen?

@svenseeberg
Copy link
Member

svenseeberg commented Jan 25, 2023

https://www.w3schools.com/cssref/css3_pr_overflow-wrap.php sadly is only available with CSS 3. The module only supports CSS 2. I was wondering if we can solve this by allowing &#x200B; (zero width space characters) in long links as a workaround. I tried to insert them but they get stripped from the HTML code. But that does not work as well.

@seluianova seluianova self-assigned this Jan 30, 2023
@seluianova
Copy link
Contributor

seluianova commented Jan 30, 2023

There is a discussion on the similar issue:
xhtml2pdf/xhtml2pdf#339

But the proposed property '-pdf-word-wrap: CJK;' only works for 'div' and 'p' elements.
I couldn't get it to apply to links.

@seluianova seluianova removed their assignment Jan 30, 2023
@ulliholtgrave ulliholtgrave added ‼️ prio: high Needs to be resolved ASAP. and removed ⁉️ prio: low Not urgent, can be resolved in the distant future. labels Feb 17, 2023
@charludo
Copy link
Contributor

charludo commented Mar 15, 2023

I know this is far from ideal, but until a fix (eventually) lands in xhtml2pdf, could we not simply truncate links over a certain length?

E.g. turn https://thisisaverylonglink.com/it/just/keeps/going/on/and/on/and/on/and/on/and/on/and/on/and/so/forth/etc/etc/etc/etc/enough.html

into either

https://thisisaverylonglink.com/it/just/keeps/going/on/and/on/and[...]

or

https://thisisaverylonglink.com/[...]

or even just

https://thisisaverylonglink.com/

?

Edit: obviously, the target must not be affected.

For consistency, we could also truncate all links, and add an icon in front of them similar to what's been done in digitalfabrik/integreat-app#815 Ah, forgot this was already happening.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
‼️ prio: high Needs to be resolved ASAP. 🐛 bug Something isn't working ☺️ effort: low Should be doable in <4h
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants